mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-05 16:50:01 +00:00
nimble/host: Fix cleaning conn when sync transfer enabled
When host is waiting for the sync transfer, conn->psync is allocated. If ACL disconnection happen before sync is established, make sure to free it.
This commit is contained in:
@@ -28,6 +28,11 @@ ble_hs_atomic_conn_delete(uint16_t conn_handle)
|
||||
conn = ble_hs_conn_find(conn_handle);
|
||||
if (conn != NULL) {
|
||||
ble_hs_conn_remove(conn);
|
||||
#if MYNEWT_VAL(BLE_PERIODIC_ADV_SYNC_TRANSFER)
|
||||
if (conn->psync) {
|
||||
ble_hs_periodic_sync_free(conn->psync);
|
||||
}
|
||||
#endif
|
||||
ble_hs_conn_free(conn);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user