Commit b88978b0 authored by Claudio Saavedra's avatar Claudio Saavedra

examples/get: pull a leak with the GOptionContext

parent fc860ecc
...@@ -199,6 +199,7 @@ main (int argc, char **argv) ...@@ -199,6 +199,7 @@ main (int argc, char **argv)
SoupURI *proxy_uri, *parsed; SoupURI *proxy_uri, *parsed;
GError *error = NULL; GError *error = NULL;
SoupLogger *logger = NULL; SoupLogger *logger = NULL;
char *help;
opts = g_option_context_new (NULL); opts = g_option_context_new (NULL);
g_option_context_add_main_entries (opts, entries, NULL); g_option_context_add_main_entries (opts, entries, NULL);
...@@ -213,8 +214,9 @@ main (int argc, char **argv) ...@@ -213,8 +214,9 @@ main (int argc, char **argv)
} }
if (argc != 2) { if (argc != 2) {
g_printerr ("%s", help = g_option_context_get_help (opts, TRUE, NULL);
g_option_context_get_help (opts, TRUE, NULL)); g_printerr ("%s", help);
g_free (help);
exit (1); exit (1);
} }
g_option_context_free (opts); g_option_context_free (opts);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment