gplugin/gplugin

Fix leaks in tests.
develop/asan
2019-01-31, Elliott Sales de Andrade
22f41c3207e2
Parents 2c8622a292ed
Children a164b787bc7d
Fix leaks in tests.
--- a/gplugin/tests/test-option-group.c Thu Jan 31 21:56:54 2019 -0500
+++ b/gplugin/tests/test-option-group.c Thu Jan 31 21:59:00 2019 -0500
@@ -29,15 +29,13 @@
GOptionGroup *group = NULL;
GList *paths = NULL, *l1 = NULL, *l2 = NULL;
gchar **argv = NULL;
- gint argc = 0;
argv = g_strsplit(args, ",", 0);
- argc = g_strv_length(argv);
ctx = g_option_context_new(NULL);
group = gplugin_get_option_group();
g_option_context_add_group(ctx, group);
- g_option_context_parse(ctx, &argc, &argv, &error);
+ g_option_context_parse_strv(ctx, &argv, &error);
g_option_context_free(ctx);
g_strfreev(argv);
--- a/gplugin/tests/test-plugin-info.c Thu Jan 31 21:56:54 2019 -0500
+++ b/gplugin/tests/test-plugin-info.c Thu Jan 31 21:59:00 2019 -0500
@@ -66,6 +66,7 @@
for(i = 0; expected[i]; i++)
g_assert_cmpstr(tmp[i], ==, expected[i]);
+ g_strfreev(got);
g_strfreev(tmp);
}