[glib] Plug a mem leak in gdbus-connection test



commit 75563e81c2b6bab345e08daafd3206cec699f2ea
Author: Christian Persch <chpe gnome org>
Date:   Tue Aug 17 18:20:23 2010 +0200

    Plug a mem leak in gdbus-connection test
    
    ==25403== 49 (24 direct, 25 indirect) bytes in 1 blocks are definitely lost in loss record 603 of 787
    ==25403==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
    ==25403==    by 0x405233C: g_malloc (gmem.c:134)
    ==25403==    by 0x406A57E: g_slice_alloc (gslice.c:836)
    ==25403==    by 0x406A5C3: g_slice_alloc0 (gslice.c:848)
    ==25403==    by 0x4035B4E: g_error_new_literal (gerror.c:117)
    ==25403==    by 0x4035ED9: g_set_error_literal (gerror.c:314)
    ==25403==    by 0x41F6434: g_dbus_connection_close_sync (gdbusconnection.c:1284)
    ==25403==    by 0x804A861: test_connection_life_cycle (gdbus-connection.c:158)
    ==25403==    by 0x4073D04: test_case_run (gtestutils.c:1174)
    ==25403==    by 0x4073FC2: g_test_run_suite_internal (gtestutils.c:1223)
    ==25403==    by 0x4074077: g_test_run_suite_internal (gtestutils.c:1233)
    ==25403==    by 0x4074077: g_test_run_suite_internal (gtestutils.c:1233)
    ==25403==    by 0x40741FB: g_test_run_suite (gtestutils.c:1274)
    ==25403==    by 0x40733E5: g_test_run (gtestutils.c:877)
    ==25403==    by 0x804DC92: main (gdbus-connection.c:1024)
    
    Bug #627187.

 gio/tests/gdbus-connection.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gio/tests/gdbus-connection.c b/gio/tests/gdbus-connection.c
index 3535f7d..c99e50c 100644
--- a/gio/tests/gdbus-connection.c
+++ b/gio/tests/gdbus-connection.c
@@ -157,6 +157,7 @@ test_connection_life_cycle (void)
   g_assert (g_dbus_connection_is_closed (c2));
   ret = g_dbus_connection_close_sync (c2, NULL, &error);
   g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CLOSED);
+  g_error_free (error);
   g_assert (!ret);
   g_object_unref (c2);
 



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