[glib] Plug a mem leak in contexts test



commit fa6937603c098e8c6e83c8e3bd35ed7bab56ca38
Author: Christian Persch <chpe gnome org>
Date:   Fri Sep 3 16:00:15 2010 -0400

    Plug a mem leak in contexts test
    
    ==14059== 96 bytes in 2 blocks are definitely lost in loss record 520 of 543
    ==14059==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
    ==14059==    by 0x4057094: g_malloc (gmem.c:134)
    ==14059==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
    ==14059==    by 0x406F31B: g_slice_alloc0 (gslice.c:848)
    ==14059==    by 0x41385BB: g_type_create_instance (gtype.c:1867)
    ==14059==    by 0x411E72A: g_object_constructor (gobject.c:1482)
    ==14059==    by 0x411DE1D: g_object_newv (gobject.c:1266)
    ==14059==    by 0x411DB93: g_object_new (gobject.c:1178)
    ==14059==    by 0x42296AF: _g_local_file_input_stream_new (glocalfileinputstream.c:152)
    ==14059==    by 0x422281F: g_local_file_read (glocalfile.c:1322)
    ==14059==    by 0x418A8A9: open_read_async_thread (gfile.c:5050)
    ==14059==    by 0x41B71BB: run_in_thread (gsimpleasyncresult.c:853)
    ==14059==    by 0x41A5FBC: io_job_thread (gioscheduler.c:181)
    ==14059==    by 0x407DCDE: g_thread_pool_thread_proxy (gthreadpool.c:314)
    ==14059==    by 0x407C6B0: g_thread_create_proxy (gthread.c:1897)
    ==14059==    by 0x57D918: start_thread (pthread_create.c:301)
    ==14059==    by 0x4C6CBD: clone (clone.S:133)
    
    Bug #628331.

 gio/tests/contexts.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gio/tests/contexts.c b/gio/tests/contexts.c
index 5a27c56..5ddb54f 100644
--- a/gio/tests/contexts.c
+++ b/gio/tests/contexts.c
@@ -39,6 +39,8 @@ opened_for_read (GObject *source, GAsyncResult *result, gpointer loop)
 			     async_read_buffer, sizeof (async_read_buffer),
 			     G_PRIORITY_DEFAULT, NULL,
 			     read_data, loop);
+
+  g_object_unref (in);
 }
 
 /* Test 1: Async I/O started in a thread with a thread-default context



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