mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
v4l2codecs: decoder: Properly remove pending requests
Pass the pointer instead of NULL in order to find and remove properly any pending request from the queue. This coding error was leading to use after free in error and early exit cases. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1696>
This commit is contained in:
parent
4af33eda76
commit
2e3bc60422
1 changed files with 1 additions and 1 deletions
|
@ -854,7 +854,7 @@ gst_v4l2_request_free (GstV4l2Request * request)
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (decoder, "Freeing pending request %p.", request);
|
GST_DEBUG_OBJECT (decoder, "Freeing pending request %p.", request);
|
||||||
|
|
||||||
idx = gst_queue_array_find (decoder->pending_requests, NULL, NULL);
|
idx = gst_queue_array_find (decoder->pending_requests, NULL, request);
|
||||||
if (idx >= 0)
|
if (idx >= 0)
|
||||||
gst_queue_array_drop_element (decoder->pending_requests, idx);
|
gst_queue_array_drop_element (decoder->pending_requests, idx);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue