validate: Fix memory leaks when context parse fails
authorVineeth T M <vineeth.tm@samsung.com>
Thu, 20 Aug 2015 07:51:03 +0000 (16:51 +0900)
committerThibault Saunier <tsaunier@gnome.org>
Wed, 11 Nov 2015 09:12:49 +0000 (10:12 +0100)
commitd57fca241a69bccd38241a8f8c6216d2f237bed1
tree3cff70158e7a4003de9051feba2e869fc8a631ab
parent1e76d905aebf0f8b8a5f4493cd8468141f5f3417
validate: 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=753862
validate/tools/gst-validate-images-check.c
validate/tools/gst-validate-media-check.c
validate/tools/gst-validate-transcoding.c
validate/tools/gst-validate.c