editing-services: Fix memory leaks when context parse fails
authorVineeth TM <vineeth.tm@samsung.com>
Thu, 20 Aug 2015 08:16:50 +0000 (17:16 +0900)
committerThibault Saunier <tsaunier@gnome.org>
Wed, 30 Sep 2015 10:16:15 +0000 (12:16 +0200)
commitfd29e28c71160ceee37eb21a03967bfbc66b0b51
treeb0d2afb9540fc40e5dd871f8714a50435be60b77
parenta8546584044e057d446709af6ad51be491d8c5a7
editing-services: 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=753864
tests/examples/multifilesrc.c
tests/examples/overlays.c
tests/examples/simple1.c
tests/examples/test4.c
tests/examples/text_properties.c
tests/examples/thumbnails.c
tests/examples/transition.c
tools/ges-launcher.c