mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 21:35:44 +00:00
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
This commit is contained in:
parent
26c481e592
commit
d1d99af229
1 changed files with 3 additions and 1 deletions
|
@ -2068,7 +2068,9 @@ 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);
|
||||||
unref_data (data);
|
/* data is definitely NULL if pad_removed goto was run. */
|
||||||
|
if (data)
|
||||||
|
unref_data (data);
|
||||||
if (buffer)
|
if (buffer)
|
||||||
gst_buffer_unref (buffer);
|
gst_buffer_unref (buffer);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue