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 734533 - amcvideoenc: Avoid leaking copy of caps object
amcvideoenc: Avoid leaking copy of caps object
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: 1.4.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-08-09 11:56 UTC by Sebastian Rasmussen
Modified: 2014-08-11 06:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch. (1.46 KB, patch)
2014-08-09 11:56 UTC, Sebastian Rasmussen
committed Details | Review

Description Sebastian Rasmussen 2014-08-09 11:56:18 UTC
gst_pad_get_pad_template_caps() returns a reference which is unreferenced, so
creating a copy using gst_caps_copy() results in a reference leak. The attached
patch removes the uncessary calls to gst_caps_copy().
Comment 1 Sebastian Rasmussen 2014-08-09 11:56:51 UTC
Created attachment 282989 [details] [review]
Proposed patch.
Comment 2 Tim-Philipp Müller 2014-08-10 11:25:27 UTC
commit c1d5aa3da560db98a28474916c12d137c706d70d
Author: Sebastian Rasmussen <sebras@hotmail.com>
Date:   Sat Aug 9 13:17:17 2014 +0200

    amcvideoenc: Avoid leaking copy of caps object
    
    gst_pad_get_pad_template_caps() returns a reference which is unreferenced,
    so creating a copy using gst_caps_copy() results in a reference leak.
    Also remove the incorrect comment to avoid confusion in the future.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734533