mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-16 16:54:38 +08:00
gdbus: Hold client reference during get name owner reply
This commit is contained in:
parent
6a8cb20ef5
commit
482fcc359d
@ -1032,6 +1032,8 @@ static void get_name_owner_reply(DBusPendingCall *call, void *user_data)
|
|||||||
DBusError error;
|
DBusError error;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
|
||||||
|
g_dbus_client_ref(client);
|
||||||
|
|
||||||
dbus_error_init(&error);
|
dbus_error_init(&error);
|
||||||
|
|
||||||
if (dbus_set_error_from_message(&error, reply) == TRUE) {
|
if (dbus_set_error_from_message(&error, reply) == TRUE) {
|
||||||
@ -1058,6 +1060,8 @@ done:
|
|||||||
|
|
||||||
dbus_pending_call_unref(client->pending_call);
|
dbus_pending_call_unref(client->pending_call);
|
||||||
client->pending_call = NULL;
|
client->pending_call = NULL;
|
||||||
|
|
||||||
|
g_dbus_client_unref(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void get_name_owner(GDBusClient *client, const char *name)
|
static void get_name_owner(GDBusClient *client, const char *name)
|
||||||
|
Loading…
Reference in New Issue
Block a user