rtsp-server: Fix memory leaks when context parse fails
authorVineeth TM <vineeth.tm@samsung.com>
Thu, 20 Aug 2015 08:01:24 +0000 (17:01 +0900)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 26 Sep 2015 08:35:17 +0000 (09:35 +0100)
commit6d20a1c9d91fb245885de11b032df975858b8151
treefa22f2576865fe300653687e1f172ece662ab5eb
parent9c513cc53600d599bc3a4dac8388f3eaaf871e2f
rtsp-server: 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=753863
examples/test-launch.c
examples/test-mp4.c
examples/test-ogg.c
examples/test-record.c
examples/test-uri.c