diff options
author | Marian Cichy <m.cichy@pengutronix.de> | 2021-03-11 10:33:25 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-03-12 22:38:15 +0200 |
commit | 80bebfb64ec9874762e26b6e779549ea587936a8 (patch) | |
tree | 0a8978e44df0a421a8f5cf3dddbc8044be53ffa6 /src/android/mm/meson.build | |
parent | f5d3fa1254420efb882bbea30db1ff34b8999567 (diff) |
libcamera: gst: Fix double-free when acquire_buffer fails
If gst_buffer_pool_acquire_buffer in gst_libcamera_task_run fails, the
unique_ptr to the request-object gets reset and hence, its destructor
is called. However, the wrap-object points to the same object and is
still alive at this moment. When the task_run-function is finished, the
destructor of the wrap-object is called, which in return calls the
destructor of the request-object again.
Instead of taking care of both, the request and the wrap-object, we can
move the request to the wrap which will then effectively take care of
the request object automatically.
Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>
Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Diffstat (limited to 'src/android/mm/meson.build')
0 files changed, 0 insertions, 0 deletions