gst-omx: Fix memory leaks when context parse fails
authorVineeth TM <vineeth.tm@samsung.com>
Thu, 20 Aug 2015 08:20:50 +0000 (17:20 +0900)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 20 Aug 2015 08:33:58 +0000 (11:33 +0300)
commitfb95ce9bfc80167eba843567aa62d62d359a2bf1
tree6f115ccc5ac37b3678f9b4acbbf0aa08294318ff
parente0327521f6d8340f9c901697e69ba942916b32da
gst-omx: 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=753865
examples/egl/testegl.c