GNOME Bugzilla – Bug 753854
gstreamer: bad: Fix memory leaks when context parse fails.
Last modified: 2015-10-02 14:25:00 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.
Created attachment 309663 [details] [review] gstreamer:bad:tests: fix memory leaks during context parse failures. patch 1: for tests folder
Created attachment 309664 [details] [review] intertest: fix memory leaks during context parse failures. patch2: for intertest
there is one more file tools/gst-app-maker Not sure if changes are needed in this
Thanks, but please squash all the commits into one
Created attachment 309673 [details] [review] gstreamer:bad: fix memory leaks during context parse failures.
Created attachment 309678 [details] [review] gstreamer:bad: fix memory leaks during context parse failures. Added the changes to gst-app-maker
commit 8c9ca808af4cb49b3bce6dd4f0d02671eba08520 Author: Vineeth TM <vineeth.tm@samsung.com> Date: Thu Aug 20 16:03:29 2015 +0900 gstreamer: bad: 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. Free'ing the same. And replacing g_error_free with g_clear_error, which checks if the error being passed is not NULL and sets the variable to NULL on free'ing. https://bugzilla.gnome.org/show_bug.cgi?id=753854