[libcamera-devel] [PATCH v6 3/7] libcamera: camera: Don't call freeBuffer() on allocateBuffer() error
Niklas Söderlund
niklas.soderlund at ragnatech.se
Tue Apr 16 21:42:50 CEST 2019
Hi Jacopo,
Thanks for your work.
On 2019-04-16 15:42:06 +0200, Jacopo Mondi wrote:
> Do not assume the freeBuffer() function can handle allocateBuffer()
> method failures, as error handling and clean up should be performed
> by allocateBuffer() method itself.
>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> ---
> src/libcamera/camera.cpp | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
> index 21caa24b90b5..2d0a80664214 100644
> --- a/src/libcamera/camera.cpp
> +++ b/src/libcamera/camera.cpp
> @@ -650,7 +650,6 @@ int Camera::allocateBuffers()
> int ret = pipe_->allocateBuffers(this, activeStreams_);
> if (ret) {
> LOG(Camera, Error) << "Failed to allocate buffers";
> - freeBuffers();
> return ret;
> }
>
> --
> 2.21.0
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
--
Regards,
Niklas Söderlund
More information about the libcamera-devel
mailing list