[glib] Plug a mem leak in converter-stream test



commit ac8600a14b7e79c6eb19dd779be3b2c8a492d934
Author: Christian Persch <chpe gnome org>
Date:   Fri Sep 3 15:39:58 2010 -0400

    Plug a mem leak in converter-stream test
    
    ==2396== 168 (92 direct, 76 indirect) bytes in 1 blocks are definitely lost in loss record 598 of 625
    ==2396==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
    ==2396==    by 0x4057094: g_malloc (gmem.c:134)
    ==2396==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
    ==2396==    by 0x406F31B: g_slice_alloc0 (gslice.c:848)
    ==2396==    by 0x413D5BB: g_type_create_instance (gtype.c:1867)
    ==2396==    by 0x412372A: g_object_constructor (gobject.c:1482)
    ==2396==    by 0x4123147: g_object_newv (gobject.c:1347)
    ==2396==    by 0x41236BB: g_object_new_valist (gobject.c:1463)
    ==2396==    by 0x4122BB4: g_object_new (gobject.c:1181)
    ==2396==    by 0x417C54D: g_converter_input_stream_new (gconverterinputstream.c:204)
    ==2396==    by 0x804A53E: test_compressor (converter-stream.c:484)
    
    Bug #628331.

 gio/tests/converter-stream.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gio/tests/converter-stream.c b/gio/tests/converter-stream.c
index 4a21cd1..c2625ad 100644
--- a/gio/tests/converter-stream.c
+++ b/gio/tests/converter-stream.c
@@ -502,6 +502,8 @@ test_compressor (void)
   g_assert (total_read == 1);
   g_assert (*converted == 5);
 
+  g_object_unref (cstream);
+
   mem = g_memory_input_stream_new_from_data (expanded,
 					     5*1000 * 2,
 					     NULL);



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