[glib] Plug a mem leak in the readwrite test



commit e481bf8bf68f46e82fa5624cd941f7880321e945
Author: Christian Persch <chpe gnome org>
Date:   Fri Sep 3 15:32:32 2010 -0400

    Plug a mem leak in the readwrite test
    
    ==2392== 38 (16 direct, 22 indirect) bytes in 1 blocks are definitely lost in loss record 367 of 573
    ==2392==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
    ==2392==    by 0x4057094: g_malloc (gmem.c:134)
    ==2392==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
    ==2392==    by 0x406F31B: g_slice_alloc0 (gslice.c:848)
    ==2392==    by 0x413D5BB: g_type_create_instance (gtype.c:1867)
    ==2392==    by 0x412372A: g_object_constructor (gobject.c:1482)
    ==2392==    by 0x4122E1D: g_object_newv (gobject.c:1266)
    ==2392==    by 0x4122B93: g_object_new (gobject.c:1178)
    ==2392==    by 0x4225D74: _g_local_file_new (glocalfile.c:310)
    ==2392==    by 0x4231897: g_local_vfs_get_file_for_path (glocalvfs.c:84)
    ==2392==    by 0x41CF91C: g_vfs_get_file_for_path (gvfs.c:94)
    ==2392==    by 0x41911B6: g_file_new_for_path (gfile.c:5898)
    ==2392==    by 0x8049E30: test_g_file_open_readwrite (readwrite.c:153)
    
    Bug #628331.

 gio/tests/readwrite.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gio/tests/readwrite.c b/gio/tests/readwrite.c
index 2b1bd5e..614b44a 100644
--- a/gio/tests/readwrite.c
+++ b/gio/tests/readwrite.c
@@ -154,6 +154,7 @@ test_g_file_open_readwrite (void)
   error = NULL;
   file_iostream = g_file_open_readwrite (file, NULL, &error);
   g_assert (file_iostream != NULL);
+  g_object_unref (file);
 
   verify_iostream (file_iostream);
 



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