[glib/wip/gcleanup] contexts: Fix memory leak in test



commit 30da964ec4ae8eb8cd2b21c35f812d2e864e4908
Author: Stef Walter <stefw gnome org>
Date:   Fri Nov 8 14:28:23 2013 +0100

    contexts: Fix memory leak in test

 gio/tests/contexts.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gio/tests/contexts.c b/gio/tests/contexts.c
index 21db7b4..1410a62 100644
--- a/gio/tests/contexts.c
+++ b/gio/tests/contexts.c
@@ -2,7 +2,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-static const gchar *test_file;
+static gchar *test_file;
 
 char *test_file_buffer;
 gsize test_file_size;
@@ -202,6 +202,7 @@ main (int argc, char **argv)
   ret = g_test_run();
 
   g_free (test_file_buffer);
+  g_free (test_file);
 
   return ret;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]