GDBusConnection: Don't leak message reply in error path
authorDavid Zeuthen <davidz@redhat.com>
Mon, 27 Feb 2012 19:53:13 +0000 (14:53 -0500)
committerDavid Zeuthen <davidz@redhat.com>
Mon, 27 Feb 2012 19:53:13 +0000 (14:53 -0500)
This was reported in bug 670909.

https://bugzilla.gnome.org/show_bug.cgi?id=670909

Signed-off-by: David Zeuthen <davidz@redhat.com>
gio/gdbusconnection.c

index 31b7cc6..1fce45f 100644 (file)
@@ -5298,8 +5298,8 @@ g_dbus_connection_call_done (GObject      *source,
     {
       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);
     }
+  g_clear_object (&reply);
   g_object_unref (simple);
 }