[glib] contexts: Fix memory leak in test



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

    contexts: Fix memory leak in test
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711802

 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 f280495..60b3d1f 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;
@@ -199,6 +199,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]