From: Christian Persch Date: Tue, 17 Aug 2010 16:29:14 +0000 (+0200) Subject: Plug a mem leak in gdbus-connection test X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a91a4a420e8ba6428e7db13bd9c308256cfbb323;p=platform%2Fupstream%2Fglib.git Plug a mem leak in gdbus-connection test ==26538== 145 (24 direct, 121 indirect) bytes in 1 blocks are definitely lost in loss record 765 of 790 ==26538== at 0x4005BDC: malloc (vg_replace_malloc.c:195) ==26538== by 0x405233C: g_malloc (gmem.c:134) ==26538== by 0x406A57E: g_slice_alloc (gslice.c:836) ==26538== by 0x406A60C: g_slice_copy (gslice.c:858) ==26538== by 0x4035C5A: g_error_copy (gerror.c:160) ==26538== by 0x41B6387: g_simple_async_result_set_from_error (gsimpleasyncresult.c:638) ==26538== by 0x41FCDEB: g_dbus_connection_call_done (gdbusconnection.c:4808) ==26538== by 0x41B682E: g_simple_async_result_complete (gsimpleasyncresult.c:762) ==26538== by 0x41B686A: complete_in_idle_cb (gsimpleasyncresult.c:772) ==26538== by 0x404DA7C: g_idle_dispatch (gmain.c:4224) ==26538== by 0x4049FCD: g_main_dispatch (gmain.c:2119) ==26538== by 0x404B2C1: g_main_context_dispatch (gmain.c:2672) ==26538== by 0x404B716: g_main_context_iterate (gmain.c:2750) ==26538== by 0x404BE7F: g_main_loop_run (gmain.c:2958) ==26538== by 0x804B5CC: test_connection_send (gdbus-connection.c:407) ==26538== by 0x4073D04: test_case_run (gtestutils.c:1174) Bug #627187. --- diff --git a/gio/tests/gdbus-connection.c b/gio/tests/gdbus-connection.c index c99e50c..e06e1fd 100644 --- a/gio/tests/gdbus-connection.c +++ b/gio/tests/gdbus-connection.c @@ -274,6 +274,7 @@ msg_cb_expect_error_unknown_method (GDBusConnection *connection, &error); g_assert_error (error, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD); g_assert (g_dbus_error_is_remote_error (error)); + g_error_free (error); g_assert (result == NULL); g_main_loop_quit (loop);