From da79298ade966eb8740c39d6db802b173e46f1ac Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Wed, 9 Dec 2009 00:54:14 +0200 Subject: [PATCH] * mu.c: fix leak in argument parsing --- src/mu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mu.c b/src/mu.c index ae150616..b657ec66 100644 --- a/src/mu.c +++ b/src/mu.c @@ -164,6 +164,7 @@ main (int argc, char *argv[]) MuConfigOptions config; MuResult rv; MuCmd cmd; + gboolean ok; g_type_init (); @@ -177,7 +178,10 @@ main (int argc, char *argv[]) mu_config_options_group_query(&config)); mu_config_init (&config); - if (!g_option_context_parse (context, &argc, &argv, &error)) { + ok = g_option_context_parse (context, &argc, &argv, &error); + g_option_context_free (context); + + if (!ok) { g_printerr ("error in options: %s\n", error->message); g_error_free (error);