From: Simon Mikuda <simon.mikuda@streamunlimited.com>
To: linux-bluetooth@vger.kernel.org
Cc: Simon Mikuda <simon.mikuda@streamunlimited.com>
Subject: [PATCH BlueZ 2/2] core/advertising: Fix crash when client is added after unregistration
Date: Mon, 4 Nov 2019 11:21:02 +0100 [thread overview]
Message-ID: <1572862862-8536-2-git-send-email-simon.mikuda@streamunlimited.com> (raw)
In-Reply-To: <1572862862-8536-1-git-send-email-simon.mikuda@streamunlimited.com>
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: Simon Mikuda <simon.mikuda@streamunlimited.com>
---
src/advertising.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/advertising.c b/src/advertising.c
index f53c14c..45ff19f 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;
--
2.7.4
next prev parent reply other threads:[~2019-11-04 10:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <157250771818414>
2019-11-04 10:21 ` [PATCH BlueZ 1/2] core/advertising: Fix crash when unregistering advertisement too fast Simon Mikuda
2019-11-04 10:21 ` Simon Mikuda [this message]
2019-11-12 13:10 ` [PATCH BlueZ 2/2] core/advertising: Fix crash when client is added after unregistration Simon Mikuda
2019-11-12 13:10 ` [PATCH BlueZ 1/2] core/advertising: Fix crash when unregistering advertisement too fast Simon Mikuda
2019-11-12 13:26 ` Luiz Augusto von Dentz
2019-11-12 13:56 Simon Mikuda
2019-11-12 13:56 ` [PATCH BlueZ 2/2] core/advertising: Fix crash when client is added after unregistration Simon Mikuda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1572862862-8536-2-git-send-email-simon.mikuda@streamunlimited.com \
--to=simon.mikuda@streamunlimited.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).