Plug a mem leak in the gdbus-proxy test
authorChristian Persch <chpe@gnome.org>
Fri, 3 Sep 2010 20:04:29 +0000 (16:04 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 3 Sep 2010 20:04:29 +0000 (16:04 -0400)
==23341== 85 (24 direct, 61 indirect) bytes in 1 blocks are definitely lost in loss record 900 of 971
==23341==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==23341==    by 0x4057094: g_malloc (gmem.c:134)
==23341==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
==23341==    by 0x406F31B: g_slice_alloc0 (gslice.c:848)
==23341==    by 0x403A751: g_error_new_valist (gerror.c:54)
==23341==    by 0x403AAD4: g_set_error (gerror.c:240)
==23341==    by 0x420B807: decode_method_reply (gdbusconnection.c:4774)
==23341==    by 0x420C2BA: g_dbus_connection_call_sync (gdbusconnection.c:5188)
==23341==    by 0x421B7C9: g_dbus_proxy_call_sync (gdbusproxy.c:2477)
==23341==    by 0x804BD89: test_bogus_method_return (gdbus-proxy.c:430)

Bug #628331.

gio/tests/gdbus-proxy.c

index 98e0855..6b663a7 100644 (file)
@@ -435,6 +435,7 @@ test_bogus_method_return (GDBusProxy *proxy)
                                    NULL,
                                    &error);
   g_assert_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT);
+  g_error_free (error);
   g_assert (result == NULL);
 }