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 775224 - subtitleoverlay: Caps memory leak when failing to get sinkpad from subtitle renderer
subtitleoverlay: Caps memory leak when failing to get sinkpad from subtitle r...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.9.1
Other Linux
: Normal normal
: 1.10.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-28 11:53 UTC by Garima
Modified: 2016-11-28 11:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixed memory leak (840 bytes, patch)
2016-11-28 11:53 UTC, Garima
committed Details | Review

Description Garima 2016-11-28 11:53:15 UTC
Created attachment 340895 [details] [review]
Fixed memory leak

'video_caps' should be freed before function returns.

Check attached patch for below fix:
     sink = _get_video_pad (renderer);
     if (G_UNLIKELY (!sink)) {
       GST_WARNING_OBJECT (self, "Can't get video sink from renderer");
+      if (video_caps)
+        gst_caps_unref (video_caps);
       return FALSE;
     }
     allowed_caps = gst_pad_query_caps (sink, NULL);
Comment 1 Sebastian Dröge (slomo) 2016-11-28 11:55:09 UTC
Comment on attachment 340895 [details] [review]
Fixed memory leak

Please mark your patches as "patch" when attaching them
Comment 2 Sebastian Dröge (slomo) 2016-11-28 11:57:25 UTC
And please also write more descriptive commit messages :)


commit b2b8e775664fa35130e4617fd7cceb846939550b
Author: Garima Gaur <garima.g@samsung.com>
Date:   Mon Nov 28 17:12:26 2016 +0530

    subtitleoverlay: Fix caps memory leak when failing to get sinkpad from subtitle renderer
    
    https://bugzilla.gnome.org/show_bug.cgi?id=775224