commit | 088fac76ed65a6cb8c367a89fae53d0e4bea2763 | [log] [tgz] |
---|---|---|
author | Szymon Janc <szymon.janc@codecoup.pl> | Mon Oct 04 14:36:40 2021 +0200 |
committer | Carles CufĂ <carles.cufi@nordicsemi.no> | Mon Oct 04 18:52:08 2021 +0200 |
tree | ebcc00692f31b929fc2e7042bf28dcfcff243547 | |
parent | 072c8f2c683b06ea6d9cd42ea5e2df5b88d907db [diff] |
Bluetooth: Mesh: Fix crash on disconnect bt_mesh_proxy_role_setup() is called conditionally when peer is connected and gatt_disconnected() is always called. This leads to unbalance in role->conn reference count and crash. Instead of hot-fixing this in gatt_disconnected(), this commit adds proper bt_mesh_proxy_role_cleanup() API that is called by roles implementations if cleanup is needed. Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>