libcamera: pipeline: rkisp1: Assert empty queuedRequests before clearing frameInfo

Assert that there are no queued requests before clearing the frameInfo,
otherwise a SEGFAULT can occur.

This issue happened while running lc-compliance.

Suggested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Nícolas F. R. A. Prado
2021-04-06 15:23:34 -03:00
committed by Niklas Söderlund
parent 330ea9d946
commit 63dd6a8327
+1
View File
@@ -842,6 +842,7 @@ void PipelineHandlerRkISP1::stop(Camera *camera)
LOG(RkISP1, Warning)
<< "Failed to stop parameters for " << camera->id();
ASSERT(data->queuedRequests_.empty());
data->frameInfo_.clear();
freeBuffers(camera);