Commit 4e880d4d authored by Zaheer Abbas Merali's avatar Zaheer Abbas Merali Committed by Sebastian Dröge
Browse files

collectpads: Don't unref NULL GstCollectData

If a pad is removed while a collectpads element (say adder) is in a chain
function waiting to be collected, there is a possibility that an unref happens
on a NULL pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=707536
parent 1125b9a9
...@@ -2058,6 +2058,8 @@ gst_collect_pads_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) ...@@ -2058,6 +2058,8 @@ gst_collect_pads_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
unlock_done: unlock_done:
GST_COLLECT_PADS_STREAM_UNLOCK (pads); GST_COLLECT_PADS_STREAM_UNLOCK (pads);
/* data is definitely NULL if pad_removed goto was run. */
if (data)
unref_data (data); unref_data (data);
if (buffer) if (buffer)
gst_buffer_unref (buffer); gst_buffer_unref (buffer);
......
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