mapping-test: Fix leaks in tests

https://bugzilla.gnome.org/show_bug.cgi?id=711751
This commit is contained in:
Stef Walter 2013-11-09 20:26:57 +01:00
parent fc4630b7ac
commit 5ae5d438a6

View File

@ -244,13 +244,22 @@ int
main (int argc,
char *argv[])
{
int ret;
dir = g_get_current_dir ();
filename = g_build_filename (dir, "maptest", NULL);
displayname = g_filename_display_name (filename);
childname = g_build_filename (dir, "mapchild", NULL);
if (argc > 1)
return child_main (argc, argv);
ret = child_main (argc, argv);
else
return parent_main (argc, argv);
ret = parent_main (argc, argv);
g_free (childname);
g_free (filename);
g_free (displayname);
g_free (dir);
return ret;
}