mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-23 20:46:14 +01:00
tests: Fix GOptionContext leak in GSubprocess tests
This commit is contained in:
parent
9347c7630f
commit
52bab0254a
@ -205,10 +205,13 @@ main (int argc, char **argv)
|
|||||||
g_option_context_add_main_entries (context, options, NULL);
|
g_option_context_add_main_entries (context, options, NULL);
|
||||||
if (!g_option_context_parse (context, &argc, &argv, &error))
|
if (!g_option_context_parse (context, &argc, &argv, &error))
|
||||||
{
|
{
|
||||||
|
g_option_context_free (context);
|
||||||
g_printerr ("%s: %s\n", argv[0], error->message);
|
g_printerr ("%s: %s\n", argv[0], error->message);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_option_context_free (context);
|
||||||
|
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
{
|
{
|
||||||
g_printerr ("MODE argument required\n");
|
g_printerr ("MODE argument required\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user