summaryrefslogtreecommitdiff
path: root/src/libcamera/camera.cpp
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2019-04-16 15:31:45 +0200
committerJacopo Mondi <jacopo@jmondi.org>2019-04-18 15:34:54 +0200
commitda341a4dd146fe525d0e794e619c93dedd1a469c (patch)
tree0b80cde6741bd1efbe688561de2abc951084db05 /src/libcamera/camera.cpp
parent911bc4aa41c16eeeaf78ddb4c0a4958bdd19fb96 (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.cpp1
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;
}