gstreamer: Fix memory leaks when context parse fails
authorVineeth TM <vineeth.tm@samsung.com>
Thu, 20 Aug 2015 07:21:59 +0000 (16:21 +0900)
committerSebastian Dröge <sebastian@centricular.com>
Fri, 2 Oct 2015 14:31:11 +0000 (17:31 +0300)
commit215cfcf993389c7950d58d7a37d9bfb0058b7ea6
tree9418fb46311fd369a218aea847aff1ddf8522516
parentd3e9f553024262839c34a6ca178470b36162637c
gstreamer: 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=753851
docs/manual/advanced-dataaccess.xml
docs/manual/appendix-integration.xml
docs/manual/basics-init.xml
libs/gst/helpers/gst-completion-helper.c
libs/gst/helpers/gst-ptp-helper.c
tests/benchmarks/capsnego.c
tests/examples/ptp/ptp-print-times.c
tools/gst-inspect.c
tools/gst-launch.c
tools/gst-typefind.c