[glib] Plug a mem leak in g-icon test



commit 01a19dee6855d3caede22ef8dc28606ee89cf60e
Author: Christian Persch <chpe gnome org>
Date:   Fri Sep 3 15:56:23 2010 -0400

    Plug a mem leak in g-icon test
    
    ==2428== 256 bytes in 1 blocks are definitely lost in loss record 591 of 604
    ==2428==    at 0x4005CD2: realloc (vg_replace_malloc.c:476)
    ==2428==    by 0x40571A5: g_realloc (gmem.c:181)
    ==2428==    by 0x4075287: g_string_maybe_expand (gstring.c:395)
    ==2428==    by 0x40760D8: g_string_insert_c (gstring.c:1049)
    ==2428==    by 0x4074D41: g_string_append_c_inline (gstring.h:153)
    ==2428==    by 0x4075B3C: g_string_append_uri_escaped (gstring.c:822)
    ==2428==    by 0x41A46AC: g_icon_to_string_tokenized (gicon.c:164)
    ==2428==    by 0x41A498F: g_icon_to_string (gicon.c:252)
    ==2428==    by 0x8049E1A: test_g_icon_serialize (g-icon.c:222)
    
    Bug #628331.

 gio/tests/g-icon.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gio/tests/g-icon.c b/gio/tests/g-icon.c
index c194f7f..2bf63b7 100644
--- a/gio/tests/g-icon.c
+++ b/gio/tests/g-icon.c
@@ -230,6 +230,7 @@ test_g_icon_serialize (void)
   g_object_unref (icon3);
   g_object_unref (icon4);
   g_object_unref (icon5);
+  g_free (data);
 }
 
 static void



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