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
@ -854,7 +854,7 @@ gst_v4l2_request_free (GstV4l2Request * 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)
|
||||
gst_queue_array_drop_element (decoder->pending_requests, idx);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user