Commit: ba266f7efdfb4c90e65f59a2da3d626ae26ab945
Parent: 25bc7dc9d1894ed29ee242820a27562494884a79
Author: Miao-chen Chou <mcchou@chromium.org>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2020-11-03 01:17:16
Tree: f12e2e3e33ebbbef85654b41e273cda9b897b979

adapter: Fix a crash caused by lingering discovery client pointer This cleans up the lingering pointer, adapter->client, during powering off the adapter. The crash occurs when a D-Bus client set Powered property to false and immediately calls StopDiscovery() when there is ongoing discovery. As a part of powering off the adapter, adapter->discovery_list gets cleared, and given that adapter->client refers to one of the clients in adapter->discovery_list, adapter->client should be cleared along with it. (1) Connect to a BT audio device from BT system tray. (2) Once the audio device is connected, power off BT and immediately power off the audio device.

Diffstat

M src/adapter.c | 9 ++++++++-

1 files changed, 8 insertions(+), 1 deletions(-)

View Full Diff | Patch