libcamera: request: addBuffer(): Do not destroy fence on failure
Take the unique pointer to the `Fence` object by rvalue reference so that it is not destroyed if the function returns an error code and does not take ownership of the unique pointer. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
This commit is contained in:
@@ -53,7 +53,7 @@ public:
|
||||
ControlList &metadata() { return *metadata_; }
|
||||
const BufferMap &buffers() const { return bufferMap_; }
|
||||
int addBuffer(const Stream *stream, FrameBuffer *buffer,
|
||||
std::unique_ptr<Fence> fence = nullptr);
|
||||
std::unique_ptr<Fence> &&fence = {});
|
||||
FrameBuffer *findBuffer(const Stream *stream) const;
|
||||
|
||||
uint32_t sequence() const;
|
||||
|
||||
Reference in New Issue
Block a user