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 776700 - Fixed memory leak in usage of gst_pad_template_new() API
Fixed memory leak in usage of gst_pad_template_new() API
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
1.9.1
Other Linux
: Normal normal
: 1.11.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-01-02 03:47 UTC by Garima
Modified: 2017-01-02 12:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixed memory leak in usage of gst_pad_template_new() API (3.84 KB, patch)
2017-01-02 03:47 UTC, Garima
committed Details | Review

Description Garima 2017-01-02 03:47:29 UTC
Created attachment 342706 [details] [review]
Fixed memory leak in usage of gst_pad_template_new() API

Fixed memory leak in usage of gst_pad_template_new() API.

The last argument to gst_pad_template_new() is not freed.
I am not sure is this required to free the caps.

But I have attached a patch for the fix.
Comment 1 Tim-Philipp Müller 2017-01-02 12:43:15 UTC
gst_pad_template_new() does not take ownership of the caps argument, so the caps need to be freed.

Thanks for the patch. I have fixed some indentation issues with it with gst-indent.

commit 14dc964f0e4526a842a245fdb86b98985bb12e3f
Author: Garima Gaur <garima.g@samsung.com>
Date:   Mon Jan 2 09:06:09 2017 +0530

    Fix some caps leaks when creating pad templates
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776700