[glib/wip/gcleanup: 39/79] mapping-test: Fix leaks in tests
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/gcleanup: 39/79] mapping-test: Fix leaks in tests
- Date: Sun, 10 Nov 2013 15:22:48 +0000 (UTC)
commit 00217b3041ada977f5d3a160900c9c0d63043c3e
Author: Stef Walter <stefw gnome org>
Date: Sat Nov 9 20:26:57 2013 +0100
mapping-test: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711751
tests/mapping-test.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/tests/mapping-test.c b/tests/mapping-test.c
index 1a10b19..263dcf9 100644
--- a/tests/mapping-test.c
+++ b/tests/mapping-test.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]