summaryrefslogtreecommitdiff
path: root/examples/get.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/get.c')
-rw-r--r--examples/get.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/get.c b/examples/get.c
index f3380b59..00dbbddf 100644
--- a/examples/get.c
+++ b/examples/get.c
@@ -199,6 +199,7 @@ main (int argc, char **argv)
SoupURI *proxy_uri, *parsed;
GError *error = NULL;
SoupLogger *logger = NULL;
+ char *help;
opts = g_option_context_new (NULL);
g_option_context_add_main_entries (opts, entries, NULL);
@@ -213,8 +214,9 @@ main (int argc, char **argv)
}
if (argc != 2) {
- g_printerr ("%s",
- g_option_context_get_help (opts, TRUE, NULL));
+ help = g_option_context_get_help (opts, TRUE, NULL);
+ g_printerr ("%s", help);
+ g_free (help);
exit (1);
}
g_option_context_free (opts);