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 753862 - devtools: Fix memory leaks when context parse fails.
devtools: Fix memory leaks when context parse fails.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-devtools
git master
Other Linux
: Normal normal
: 1.7.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-08-20 07:50 UTC by Vineeth
Modified: 2015-11-18 00:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
validate: fix memory leaks during context parse failures. (2.65 KB, patch)
2015-08-20 07:51 UTC, Vineeth
committed Details | Review
codecanalyzer: fix memory leaks during context parse failures. (1.11 KB, patch)
2015-08-20 07:55 UTC, Vineeth
committed Details | Review

Description Vineeth 2015-08-20 07:50:57 UTC
In all places where g_option_context_parse is being used, when it fails, the context and error variables are not getting freed, which will result in memory leaks.
Along with that replacing g_error_free with g_clear_error in these files, which is a better way to free error, as it checks if the variable is Non-NULL and then sets it to NULL on freeing.
Comment 1 Vineeth 2015-08-20 07:51:51 UTC
Created attachment 309681 [details] [review]
validate: fix memory leaks during context parse failures.
Comment 2 Vineeth 2015-08-20 07:55:14 UTC
Created attachment 309682 [details] [review]
codecanalyzer: fix memory leaks during context parse failures.
Comment 3 Vineeth 2015-11-11 00:32:02 UTC
ping :)
Comment 4 Thibault Saunier 2015-11-11 09:07:38 UTC
Review of attachment 309681 [details] [review]:

OK
Comment 5 Tim-Philipp Müller 2015-11-18 00:36:02 UTC
Pushed the other one too:

commit 581b0cfced568e37c8ced0f3e28311f6579ea4e8
Author: Vineeth T M <vineeth.tm@samsung.com>
Date:   Thu Aug 20 16:54:14 2015 +0900

    codecanalyzer: Fix memory leaks when context parse fails
    
    When g_option_context_parse fails, context and error variables are
    not getting free'd which results in memory leaks being reported.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753862