[glib] Plug some mem leaks in gdbus-peer test



commit be33ef85d0a89c2ded655785a4b930926e403e64
Author: Christian Persch <chpe gnome org>
Date:   Fri Sep 3 16:03:48 2010 -0400

    Plug some mem leaks in gdbus-peer test
    
    ==29535== 56 (24 direct, 32 indirect) bytes in 1 blocks are definitely lost in loss record 1,112 of 1,264
    ==29535==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
    ==29535==    by 0x4057094: g_malloc (gmem.c:134)
    ==29535==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
    ==29535==    by 0x406F364: g_slice_copy (gslice.c:858)
    ==29535==    by 0x403A9B2: g_error_copy (gerror.c:160)
    ==29535==    by 0x42066D3: initable_init (gdbusconnection.c:2314)
    ==29535==    by 0x41A73E5: g_initable_init (ginitable.c:105)
    ==29535==    by 0x41A7587: g_initable_new_valist (ginitable.c:218)
    ==29535==    by 0x41A742A: g_initable_new (ginitable.c:138)
    ==29535==    by 0x4206DCC: g_dbus_connection_new_for_address_sync (gdbusconnection.c:2585)
    ==29535==    by 0x804D63A: test_nonce_tcp (gdbus-peer.c:1229)
    
    ==29535== 107 (24 direct, 83 indirect) bytes in 1 blocks are definitely lost in loss record 1,188 of 1,264
    ==29535==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
    ==29535==    by 0x4057094: g_malloc (gmem.c:134)
    ==29535==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
    ==29535==    by 0x406F364: g_slice_copy (gslice.c:858)
    ==29535==    by 0x403A9B2: g_error_copy (gerror.c:160)
    ==29535==    by 0x42066D3: initable_init (gdbusconnection.c:2314)
    ==29535==    by 0x41A73E5: g_initable_init (ginitable.c:105)
    ==29535==    by 0x41A7587: g_initable_new_valist (ginitable.c:218)
    ==29535==    by 0x41A742A: g_initable_new (ginitable.c:138)
    ==29535==    by 0x4206DCC: g_dbus_connection_new_for_address_sync (gdbusconnection.c:2585)
    ==29535==    by 0x804D8E8: test_nonce_tcp (gdbus-peer.c:1259)
    
    ==29535== 112 (24 direct, 88 indirect) bytes in 1 blocks are definitely lost in loss record 1,193 of 1,264
    ==29535==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
    ==29535==    by 0x4057094: g_malloc (gmem.c:134)
    ==29535==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
    ==29535==    by 0x406F364: g_slice_copy (gslice.c:858)
    ==29535==    by 0x403A9B2: g_error_copy (gerror.c:160)
    ==29535==    by 0x42066D3: initable_init (gdbusconnection.c:2314)
    ==29535==    by 0x41A73E5: g_initable_init (ginitable.c:105)
    ==29535==    by 0x41A7587: g_initable_new_valist (ginitable.c:218)
    ==29535==    by 0x41A742A: g_initable_new (ginitable.c:138)
    ==29535==    by 0x4206DCC: g_dbus_connection_new_for_address_sync (gdbusconnection.c:2585)
    ==29535==    by 0x804D79A: test_nonce_tcp (gdbus-peer.c:1248)
    
    ==29535== 73 (24 direct, 49 indirect) bytes in 1 blocks are definitely lost in loss record 1,152 of 1,264
    ==29535==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
    ==29535==    by 0x4057094: g_malloc (gmem.c:134)
    ==29535==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
    ==29535==    by 0x406F364: g_slice_copy (gslice.c:858)
    ==29535==    by 0x403A9B2: g_error_copy (gerror.c:160)
    ==29535==    by 0x42066D3: initable_init (gdbusconnection.c:2314)
    ==29535==    by 0x41A73E5: g_initable_init (ginitable.c:105)
    ==29535==    by 0x41A7587: g_initable_new_valist (ginitable.c:218)
    ==29535==    by 0x41A742A: g_initable_new (ginitable.c:138)
    ==29535==    by 0x4206DCC: g_dbus_connection_new_for_address_sync (gdbusconnection.c:2585)
    ==29535==    by 0x804C6CE: test_peer (gdbus-peer.c:803)
    
    Bug #628331.

 gio/tests/gdbus-peer.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gio/tests/gdbus-peer.c b/gio/tests/gdbus-peer.c
index 503e9d5..49ffa8b 100644
--- a/gio/tests/gdbus-peer.c
+++ b/gio/tests/gdbus-peer.c
@@ -806,6 +806,7 @@ test_peer (void)
                                                NULL, /* cancellable */
                                                &error);
   _g_assert_error_domain (error, G_IO_ERROR);
+  g_error_free (error);
   g_assert (c2 == NULL);
 
 #if 0
@@ -1232,6 +1233,7 @@ test_nonce_tcp (void)
                                               NULL, /* cancellable */
                                               &error);
   _g_assert_error_domain (error, G_IO_ERROR);
+  g_error_free (error);
   g_assert (c == NULL);
 
   /* Then try with a nonce-file of incorrect length - this will make
@@ -1251,6 +1253,7 @@ test_nonce_tcp (void)
                                               NULL, /* cancellable */
                                               &error);
   g_assert_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT);
+  g_error_free (error);
   g_assert (c == NULL);
 
   /* Finally try with no nonce-file at all */
@@ -1262,6 +1265,7 @@ test_nonce_tcp (void)
                                               NULL, /* cancellable */
                                               &error);
   g_assert_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT);
+  g_error_free (error);
   g_assert (c == NULL);
 
   g_free (nonce_file);



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