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 551978 - Memleak in gst_element_sync_state_with_paren
Memleak in gst_element_sync_state_with_paren
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal normal
: 0.10.21
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-09-12 15:20 UTC by Antoine Tremblay
Modified: 2008-09-14 22:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix the memleak (464 bytes, patch)
2008-09-12 15:21 UTC, Antoine Tremblay
committed Details | Review

Description Antoine Tremblay 2008-09-12 15:20:04 UTC
Please describe the problem:
If the change state is a failure the parent isn't unreffed
since the goto skips the unref

 ret = gst_element_set_state (element, target);
 
    if (ret == GST_STATE_CHANGE_FAILURE)
      goto failed;

 gst_object_unref (parent);

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
See patch below to fix
Comment 1 Antoine Tremblay 2008-09-12 15:21:15 UTC
Created attachment 118594 [details] [review]
Patch to fix the memleak

Original Patch by Sebastien Cote
Comment 2 Wim Taymans 2008-09-14 22:02:04 UTC
        Based on patch by: Antoine Tremblay <hexa00 at gmail dot com>

        * gst/gstelement.c: (gst_element_sync_state_with_parent):
        Avoid leaking the parent ref when we fail changing the state of the 
        element using gst_element_sync_state_with_parent(). Fixes #551978.