[glib: 2/4] tests: Fix GOptionContext leak in GSubprocess tests
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 2/4] tests: Fix GOptionContext leak in GSubprocess tests
- Date: Thu, 1 Nov 2018 12:00:27 +0000 (UTC)
commit 52bab0254a389cafde18c23df05f6f92b4a5c3d8
Author: Tomasz Miąsko <tomasz miasko gmail com>
Date: Thu Nov 1 00:00:00 2018 +0000
tests: Fix GOptionContext leak in GSubprocess tests
gio/tests/gsubprocess-testprog.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gio/tests/gsubprocess-testprog.c b/gio/tests/gsubprocess-testprog.c
index 74cb9e2a3..8d032540c 100644
--- a/gio/tests/gsubprocess-testprog.c
+++ b/gio/tests/gsubprocess-testprog.c
@@ -205,10 +205,13 @@ main (int argc, char **argv)
g_option_context_add_main_entries (context, options, NULL);
if (!g_option_context_parse (context, &argc, &argv, &error))
{
+ g_option_context_free (context);
g_printerr ("%s: %s\n", argv[0], error->message);
return 1;
}
+ g_option_context_free (context);
+
if (argc < 2)
{
g_printerr ("MODE argument required\n");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]