summaryrefslogtreecommitdiff
path: root/gdbus
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2013-01-02 15:35:53 (GMT)
committerMarcel Holtmann <marcel@holtmann.org>2013-01-02 15:37:51 (GMT)
commite37331fde81de9c9d7a73d60675d4a33e5460576 (patch)
tree26db01cf7606cb0ca815c9834bf1855eafeda22f /gdbus
parent759a661995e13094c2052d4af35029f8f5be767d (diff)
downloadconnman-e37331fde81de9c9d7a73d60675d4a33e5460576.zip
connman-e37331fde81de9c9d7a73d60675d4a33e5460576.tar.gz
connman-e37331fde81de9c9d7a73d60675d4a33e5460576.tar.bz2
gdbus: Hold client reference during get name owner reply
Diffstat (limited to 'gdbus')
-rw-r--r--gdbus/client.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdbus/client.c b/gdbus/client.c
index 03276f0..c03e3a4 100644
--- a/gdbus/client.c
+++ b/gdbus/client.c
@@ -1032,6 +1032,8 @@ static void get_name_owner_reply(DBusPendingCall *call, void *user_data)
DBusError error;
const char *name;
+ g_dbus_client_ref(client);
+
dbus_error_init(&error);
if (dbus_set_error_from_message(&error, reply) == TRUE) {
@@ -1058,6 +1060,8 @@ done:
dbus_pending_call_unref(client->pending_call);
client->pending_call = NULL;
+
+ g_dbus_client_unref(client);
}
static void get_name_owner(GDBusClient *client, const char *name)