summaryrefslogtreecommitdiffstats
path: root/glib/dbus-gproxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'glib/dbus-gproxy.c')
-rw-r--r--glib/dbus-gproxy.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/glib/dbus-gproxy.c b/glib/dbus-gproxy.c
index 1c2f4a1d..17b76d93 100644
--- a/glib/dbus-gproxy.c
+++ b/glib/dbus-gproxy.c
@@ -1386,7 +1386,7 @@ dbus_g_proxy_end_call (DBusGProxy *proxy,
g_return_val_if_fail (pending != NULL, FALSE);
dbus_pending_call_block (DBUS_PENDING_CALL_FROM_G_PENDING_CALL (pending));
- message = dbus_pending_call_get_reply (DBUS_PENDING_CALL_FROM_G_PENDING_CALL (pending));
+ message = dbus_pending_call_steal_reply (DBUS_PENDING_CALL_FROM_G_PENDING_CALL (pending));
g_assert (message != NULL);
@@ -1403,6 +1403,7 @@ dbus_g_proxy_end_call (DBusGProxy *proxy,
}
va_end (args);
+ dbus_message_unref (message);
return TRUE;
case DBUS_MESSAGE_TYPE_ERROR:
@@ -1416,6 +1417,8 @@ dbus_g_proxy_end_call (DBusGProxy *proxy,
}
error:
+ dbus_message_unref (message);
+
dbus_set_g_error (error, &derror);
dbus_error_free (&derror);
return FALSE;