summaryrefslogtreecommitdiff
path: root/src/advertising.c
diff options
context:
space:
mode:
authorSimon Mikuda <simon.mikuda@streamunlimited.com>2019-11-12 14:56:35 +0100
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2019-11-13 13:45:27 +0200
commitfa1ad60fc754fd970a27dafe7121036de7da74a7 (patch)
tree31f532bdc52703fd025c3e1809cbe4cb156a9a4c /src/advertising.c
parentcaff2b48ca54bbc57b5da3f63317767489aa5b48 (diff)
downloadbluez-fa1ad60fc754fd970a27dafe7121036de7da74a7.tar.gz
core/advertising: Fix crash when client is added after unregistration
After "register_advertisement()" callback "client_proxy_added()" was yet called but it was actually called after: "unregister_advertisement()" which caused segmentation fault because client was removed twice.
Diffstat (limited to 'src/advertising.c')
-rw-r--r--src/advertising.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/advertising.c b/src/advertising.c
index f53c14cf4..45ff19fa0 100644
--- a/src/advertising.c
+++ b/src/advertising.c
@@ -190,6 +190,8 @@ static void client_remove(void *data)
struct btd_adv_client *client = data;
struct mgmt_cp_remove_advertising cp;
+ g_dbus_client_set_proxy_handlers(client->client, NULL, NULL, NULL,
+ client);
g_dbus_client_set_disconnect_watch(client->client, NULL, NULL);
cp.instance = client->instance;