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 788035 - autoconvert: chain functions leak memory in error case
autoconvert: chain functions leak memory in error case
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal minor
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-09-22 07:11 UTC by James Stevenson
Modified: 2017-09-22 07:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix memory leaks (1.15 KB, patch)
2017-09-22 07:16 UTC, James Stevenson
committed Details | Review

Description James Stevenson 2017-09-22 07:11:54 UTC
It looks like there is two memory leaks in autoconvert. In the functions for the gst_auto_convert_sink_chain and gst_auto_convert_sink_chain_list. If an element isn't found and the internal's still have a "autoconvert->current_internal_srcpad == 0" then the buffer and buffer lists will be leaked on these failure cases as the buffer is neither passed or free'ed
Comment 1 James Stevenson 2017-09-22 07:16:50 UTC
Created attachment 360242 [details] [review]
Fix memory leaks

Fixes memory leaks by adding calls to the correct unref functions during the error conditions
Comment 2 Tim-Philipp Müller 2017-09-22 07:50:04 UTC
Thanks!

commit 9d5d9897e5911e2e2916f0cf83a0f473a2290b7b
Author: James Stevenson <james@stev.org>
Date:   Fri Sep 22 08:10:44 2017 +0100

    autoconvert: Fix two memory leaks on error conditions
    
    Both the sink_chain and sink_chain_list will neither pass
    or free the buffer if the internal src pad doesn't exist yet.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=788035