projects
/
platform
/
upstream
/
glib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: Fix some minor leaks in the unit tests
[platform/upstream/glib.git]
/
glib
/
tests
/
option-context.c
diff --git
a/glib/tests/option-context.c
b/glib/tests/option-context.c
index
d56eb53
..
8cf77a6
100644
(file)
--- a/
glib/tests/option-context.c
+++ b/
glib/tests/option-context.c
@@
-2384,12
+2384,13
@@
short_remaining (void)
{ NULL }
};
GOptionContext* context;
{ 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);
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);
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_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);
}
g_option_context_free (context);
}