Commit 5aa83122 authored by Seungha Yang's avatar Seungha Yang 🐑 Committed by GStreamer Merge Bot

urisourcebin: Fix crash caused by use after free

OutputSlotInfo doesn't hold ref of queue, so gst_bin_remove()
will free the queue memory.

Part-of: <gstreamer/gst-plugins-base!888>
parent e999318f
......@@ -2008,12 +2008,11 @@ free_output_slot (OutputSlotInfo * slot, GstURISourceBin * urisrc)
gst_element_set_locked_state (slot->queue, TRUE);
gst_element_set_state (slot->queue, GST_STATE_NULL);
remove_buffering_msgs (urisrc, GST_OBJECT_CAST (slot->queue));
gst_bin_remove (GST_BIN_CAST (urisrc), slot->queue);
gst_object_unref (slot->sinkpad);
remove_buffering_msgs (urisrc, GST_OBJECT_CAST (slot->queue));
/* deactivate and remove the srcpad */
gst_pad_set_active (slot->srcpad, FALSE);
gst_element_remove_pad (GST_ELEMENT_CAST (urisrc), slot->srcpad);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment