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>
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);