[Bluetooth] Prevent crash in BLE advertising 26/244626/1
authorPawel Wasowski <p.wasowski2@samsung.com>
Wed, 16 Sep 2020 18:02:29 +0000 (20:02 +0200)
committerPawel Wasowski <p.wasowski2@samsung.com>
Tue, 22 Sep 2020 11:44:54 +0000 (13:44 +0200)
commit04b0ddeb14de2f01380f3529f9b96125f6d2fa09
tree5e7942b82c55e5493aeb5dfcb052527fe650d599
parent0d1f5cd0b9aee3f61a894a6884dda9dec00f91a4
[Bluetooth] Prevent crash in BLE advertising

bt_advertiser_h pointer was freed twice in some cases, which lead to
crashes. Setting it to a nullptr after the first destruction fixes the
problem.

[Verification] Tested crashing scenario in Chrome DevTools Console and
no crashes occurred with the change.
tct-tizen-bluetooth-tests: 100 % pass rate (auto; manual were not run,
because they don't test BluetoothLEAdapter APIs)

Change-Id: Ie0d3de744075a4c08e5266fed274e98a0d9567b8
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
src/bluetooth/bluetooth_le_adapter.cc