diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2019-04-16 15:31:45 +0200 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2019-04-18 15:34:54 +0200 |
commit | da341a4dd146fe525d0e794e619c93dedd1a469c (patch) | |
tree | 0b80cde6741bd1efbe688561de2abc951084db05 /src/libcamera/camera.cpp | |
parent | 911bc4aa41c16eeeaf78ddb4c0a4958bdd19fb96 (diff) |
libcamera: camera: Don't call freeBuffer() on allocateBuffer() error
Do not assume the freeBuffer() function can handle allocateBuffer()
method failures, as error handling and clean up should be performed
by allocateBuffer() method itself.
Perform clean-up on allocations failures in the IPU3 pipeline handler,
now that freeBuffers() is not called anymore.
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/camera.cpp')
-rw-r--r-- | src/libcamera/camera.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 21caa24b..2d0a8066 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; } |