[glib] Plug a mem leak in the memory-input-stream test



commit 689b054b6e176c2f1b4bb90ca2a0e514de5e2a0e
Author: Christian Persch <chpe gnome org>
Date:   Fri Sep 3 15:31:37 2010 -0400

    Plug a mem leak in the memory-input-stream test
    
    ==2389== 84 (44 direct, 40 indirect) bytes in 1 blocks are definitely lost in loss record 299 of 315
    ==2389==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
    ==2389==    by 0x4057094: g_malloc (gmem.c:134)
    ==2389==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
    ==2389==    by 0x406F31B: g_slice_alloc0 (gslice.c:848)
    ==2389==    by 0x413D5BB: g_type_create_instance (gtype.c:1867)
    ==2389==    by 0x412372A: g_object_constructor (gobject.c:1482)
    ==2389==    by 0x4122E1D: g_object_newv (gobject.c:1266)
    ==2389==    by 0x4122B93: g_object_new (gobject.c:1178)
    ==2389==    by 0x41AF54C: g_memory_input_stream_new (gmemoryinputstream.c:199)
    ==2389==    by 0x8048BD1: test_read_chunks (memory-input-stream.c:40)
    
    Bug #628331.

 gio/tests/memory-input-stream.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gio/tests/memory-input-stream.c b/gio/tests/memory-input-stream.c
index a111d7a..6651695 100644
--- a/gio/tests/memory-input-stream.c
+++ b/gio/tests/memory-input-stream.c
@@ -63,6 +63,8 @@ test_read_chunks (void)
       g_assert_cmpint (res, ==, TRUE);
       g_assert_no_error (error);
     }
+
+  g_object_unref (stream);
 }
 
 static void



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