[glib] GDBusConnection: Don't leak message reply in error path



commit 7a4a973cfd1508065efa69c6a910cd01b490499a
Author: David Zeuthen <davidz redhat com>
Date:   Mon Feb 27 14:53:13 2012 -0500

    GDBusConnection: Don't leak message reply in error path
    
    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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index 31b7cc6..1fce45f 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -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);
 }
 



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