summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2019-09-06 14:41:44 +0300
committerClaudio Saavedra <csaavedra@igalia.com>2019-09-11 09:28:41 +0000
commitb88978b0a10a8c1dcb54e99c5034281c3f5a8a95 (patch)
tree1d79e448eae0b0c38377f28324e37d190884257d /examples
parentfc860ecce5f7514c023ec31205be6cf352551712 (diff)
downloadlibsoup-b88978b0a10a8c1dcb54e99c5034281c3f5a8a95.tar.gz
examples/get: pull a leak with the GOptionContext
Diffstat (limited to 'examples')
-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);