gstreamer: bad: Fix memory leaks when context parse fails
authorVineeth TM <vineeth.tm@samsung.com>
Thu, 20 Aug 2015 07:03:29 +0000 (16:03 +0900)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:32:09 +0000 (19:32 +0000)
commitdef421acf6c37a03322b51f10f9a826540c848eb
tree115fc021833b2b2058d3392889c5b230030eec82
parent16ee1636dc78491983d0f1b114fa442999f1e1c2
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
tests/examples/gl/gtk/fxtest/fxtest.c
tests/examples/gl/gtk/fxtest/pixbufdrop.c