GNOME Bugzilla – Bug 670909
g_dbus_connection_call leaks when it receives an error reply
Last modified: 2012-02-27 19:55:47 UTC
g_dbus_connection_call_done() has this logic: reply = g_dbus_connection_send_message_with_reply_finish (connection, result, &error); ... if (reply != NULL) state->value = decode_method_reply (reply, state->method_name, state->reply_type, &state->fd_list, &error); simple = state->simple; if (error != NULL) { g_simple_async_result_take_error (state->simple, error); g_simple_async_result_complete (state->simple); call_state_free (state); } else { g_simple_async_result_set_op_res_gpointer (state->simple, state, (GDestroyNotify) call_state_free); g_simple_async_result_complete (state->simple); g_object_unref (reply); } Which is clearly capable of having reply != NULL with error set. In the (error != NULL) case reply isn't freed, and it leaks.
Fixed on master.. checked the test suite and it passes.. thanks for noticing.