X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=glib%2Ftests%2Foption-context.c;h=8cf77a6f0e3ac48fc1d9d9ab8fdecdcabe5c2210;hb=a4612a922bc984ff45e2096d2d286da1be5be481;hp=d56eb534ae63a1d47dfdc0695928943046dd88b8;hpb=cb2c6eef0a5a044b39f8c92360e3e01375e23d10;p=platform%2Fupstream%2Fglib.git diff --git a/glib/tests/option-context.c b/glib/tests/option-context.c index d56eb53..8cf77a6 100644 --- a/glib/tests/option-context.c +++ b/glib/tests/option-context.c @@ -2384,12 +2384,13 @@ short_remaining (void) { NULL } }; GOptionContext* context; - gchar **argv; + gchar **argv, **argv_copy; gint argc; g_test_bug ("729563"); argv = split_string ("program -ri -n 4 -t hello file1 file2", &argc); + argv_copy = copy_stringv (argv, argc); context = g_option_context_new (NULL); @@ -2407,7 +2408,10 @@ short_remaining (void) g_assert_cmpstr (files[1], ==, "file2"); g_assert (files[2] == NULL); - g_strfreev (argv); + g_free (text); + g_strfreev (files); + g_strfreev (argv_copy); + g_free (argv); g_option_context_free (context); }