From: Marcel Holtmann Date: Wed, 2 Jan 2013 15:35:53 +0000 (-0800) Subject: gdbus: Hold client reference during get name owner reply X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7738e3a92ce10e820fd1496fb580d388648153b9;p=platform%2Fupstream%2Fofono.git gdbus: Hold client reference during get name owner reply --- 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)