Plug a mem leak in converter-stream test
authorChristian Persch <chpe@gnome.org>
Fri, 3 Sep 2010 19:39:58 +0000 (15:39 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 3 Sep 2010 19:39:58 +0000 (15:39 -0400)
==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

index 4a21cd1..c2625ad 100644 (file)
@@ -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);