projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26c481e
)
collectpads: Don't unref NULL GstCollectData
author
Zaheer Abbas Merali
<zaheermerali@gmail.com>
Thu, 5 Sep 2013 12:14:42 +0000
(14:14 +0200)
committer
Sebastian Dröge
<slomo@circular-chaos.org>
Thu, 5 Sep 2013 12:15:30 +0000
(14:15 +0200)
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
libs/gst/base/gstcollectpads.c
patch
|
blob
|
history
diff --git
a/libs/gst/base/gstcollectpads.c
b/libs/gst/base/gstcollectpads.c
index
e9cabab
..
d24e03b
100644
(file)
--- a/
libs/gst/base/gstcollectpads.c
+++ b/
libs/gst/base/gstcollectpads.c
@@
-2068,7
+2068,9
@@
gst_collect_pads_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
unlock_done:
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)
gst_buffer_unref (buffer);
return ret;