[Bug 733119] New: utils: Unret/release pads in error cases when linking pads

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Jul 13 06:36:51 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=733119
  GStreamer | gstreamer (core) | git

           Summary: utils: Unret/release pads in error cases when linking
                    pads
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: All
            Status: UNCONFIRMED
          Severity: minor
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: sebras at hotmail.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


I accidentally discovered that gst_element_link_pads_full() had several
instances where if it failed to link it was leaking reference to pads or forgot
to release request pads.

The attached patch attempts to fix these leaks as well as add a unit test to
verify that no leaks persist. I ran this successfully in valgrind.

Now, this slightly changes the behaviour of gst_element_link_pads_full() as it
previously would in some cases not release any request pads on the elements you
tried to link together. I don't know if there is any code out there that used
to take this into account.

Also please review the changes carefully. While I think this patch improves the
situation, the code in this helper(!)-function is sufficiently hairy to have
made me suspicious of my own changes.

-- 
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