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 773907 - gst-launch: fix minor memory leak when failing to parse options
gst-launch: fix minor memory leak when failing to parse options
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other Linux
: Normal minor
: 1.11.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-03 17:29 UTC by Antonio Ospite
Modified: 2016-11-04 15:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gst-launch: fix minor memory leak when failing to parse options (1.22 KB, patch)
2016-11-03 17:29 UTC, Antonio Ospite
committed Details | Review

Description Antonio Ospite 2016-11-03 17:29:38 UTC
Created attachment 339056 [details] [review]
gst-launch: fix minor memory leak when failing to parse options

A minor issue, but I noticed it while reading the code and so here is a patch.

To keep the changes to a minimum I left both the variables "err" and "error" in gst-launch.c::main(), but I see that the code could have just used "error" everywhere and avoid the confusion.

Ciao,
   Antonio
Comment 1 Sebastian Dröge (slomo) 2016-11-04 15:00:33 UTC
commit 050f486d10b463180b3d3d2b55bc0db7ff5247db
Author: Antonio Ospite <ao2@ao2.it>
Date:   Wed Nov 2 13:57:51 2016 +0100

    tools: gst-launch: fix minor memory leak when failing to parse options
    
    Commit 215cfcf99338 (gstreamer: Fix memory leaks when context parse
    fails) fixes some memory leak, but in one of the newly added calls to
    g_clear_error() the wrong variable was passed.
    
    When failing to parse command line options, free the "err" variable, not
    the "error" one.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=773907