From: Simon Mikuda Date: Tue, 12 Nov 2019 13:56:35 +0000 (+0100) Subject: core/advertising: Fix crash when client is added after unregistration X-Git-Tag: accepted/tizen/unified/20210607.124421~301 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f2ed98a67228dc67b265b413b775ffc7412ca1d;p=platform%2Fupstream%2Fbluez.git 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. Signed-off-by: Anuj Jain Signed-off-by: Ayush Garg --- diff --git a/src/advertising.c b/src/advertising.c index f39be7f..5e9fd3e 100644 --- a/src/advertising.c +++ b/src/advertising.c @@ -185,6 +185,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;