summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVineeth T M <vineeth.tm@samsung.com>2015-08-20 16:54:14 +0900
committerTim-Philipp Müller <tim@centricular.com>2015-11-18 00:34:30 +0000
commit581b0cfced568e37c8ced0f3e28311f6579ea4e8 (patch)
tree9c85c7d7ecf3ebf2a7d2aec39b4eb0c78e7d8cd5
parent680ca5e10f89fc48134d3c1fbf3005ceeae723d7 (diff)
codecanalyzer: 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 being reported. https://bugzilla.gnome.org/show_bug.cgi?id=753862
-rw-r--r--codecanalyzer/src/codecanalyzer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/codecanalyzer/src/codecanalyzer.c b/codecanalyzer/src/codecanalyzer.c
index c25ddc2..5bb1740 100644
--- a/codecanalyzer/src/codecanalyzer.c
+++ b/codecanalyzer/src/codecanalyzer.c
@@ -1015,6 +1015,8 @@ main (int argc, char *argv[])
g_printerr ("Failed to initialize: %s\n", err->message);
else
g_printerr ("Failed to initialize, Unknown error\n");
+ g_clear_error (&err);
+ g_option_context_free (ctx);
exit (1);
}
g_option_context_free (ctx);