[Bug 662664] New: Fix template pad ref leaks

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Oct 25 03:21:19 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=662664
  GStreamer | gst-plugins | git

           Summary: Fix template pad ref leaks
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: vincent.penquerch at collabora.co.uk
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


Plenty of cut and pasted code pass a pad template ref to a function that does
not take the ref, without unreffing the pad template afterwards (though a few
do).

The patches below touch a huge amount of files, but the alternatives seem
unworkable (_add_pad_template has to take a ref, from a comment within, and
gst_static_pad_template_get has to return a ref).

Note that the cleanup function in gstelement.c does not seem to be called, so
that ref taken by _add_pad_template isn't released, causing the object not
actually be unreffed, so this needs looking at too (though some people may look
at this as not-a-real-leak as it's called once per class and not once per
object).

One patch for the API addition, then one patch per repo to use it.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list