[libsoup/leaks: 1/3] examples/get: pull a leak with the GOptionContext
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/leaks: 1/3] examples/get: pull a leak with the GOptionContext
- Date: Fri, 6 Sep 2019 11:54:17 +0000 (UTC)
commit b5c2b14b77c99d231384c6bde5ff425dc6073124
Author: Claudio Saavedra <csaavedra igalia com>
Date: Fri Sep 6 14:41:44 2019 +0300
examples/get: pull a leak with the GOptionContext
examples/get.c | 6 ++++--
1 file 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]