GNOME Bugzilla – Bug 338335
[patch] memleak in gst-utils.c (leak pads from iterator)
Last modified: 2006-04-28 15:49:00 UTC
Index: gstutils.c =================================================================== --- gstutils.c (revision 1629) +++ gstutils.c (working copy) @@ -2903,6 +2903,7 @@ push_and_ref (GstPad * pad, GstEvent * event) { gst_pad_push_event (pad, gst_event_ref (event)); + gst_object_unref(pad); } patch by Topi Paavola
TODO: add unit-test
Created attachment 63374 [details] [review] tests case for the leak
Just to save others of the work - these are the elemnts using the function that leaked. I've checked those and IMHO fixing the leak will not break any of these. ./gst-plugins-bad/ext/faad/gstfaad.c ./gst-plugins-bad/ext/musepack/gstmusepackdec.c ./gst-plugins-bad/ext/swfdec/gstswfdec.c ./gst-plugins-bad/gst/qtdemux/qtdemux.c ./gst-plugins-base/ext/ogg/gstoggdemux.c ./gst-plugins-good/ext/flac/gstflactag.c ./gst-plugins-good/gst/avi/gstavidemux.c ./gst-plugins-good/gst/matroska/matroska-demux.c ./gst-plugins-ugly/ext/dvdnav/dvdnavsrc.c ./gst-plugins-ugly/gst/realmedia/rmdemux.c ./gst-plugins-ugly/gst/asfdemux/gstasfdemux.c
* gst/gstutils.c: (push_and_ref): Added some more docs. Fix refcount issue whith gst_element_found_tags() helper function. Fixes #338335 * tests/check/gst/gstutils.c: (GST_START_TEST), (gst_utils_suite): Added testsuite for gst_element_found_tags().