After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 338335 - [patch] memleak in gst-utils.c (leak pads from iterator)
[patch] memleak in gst-utils.c (leak pads from iterator)
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal normal
: 0.10.7
Assigned To: Stefan Sauer (gstreamer, gtkdoc dev)
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-04-13 11:01 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2006-04-28 15:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests case for the leak (1.33 KB, patch)
2006-04-13 12:39 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review

Description Stefan Sauer (gstreamer, gtkdoc dev) 2006-04-13 11:01:19 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
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2006-04-13 11:14:11 UTC
TODO: add unit-test
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2006-04-13 12:39:49 UTC
Created attachment 63374 [details] [review]
tests case for the leak
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2006-04-14 17:14:55 UTC
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
Comment 4 Wim Taymans 2006-04-28 15:49:00 UTC
        * 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().