Skip to content

Commit

Permalink
Fixed deadlock due to wrong parameter when calling btc_transfer_conte…
Browse files Browse the repository at this point in the history
…xt() after calling esp_bluedroid_disable()

Closes #9672
  • Loading branch information
xiongweichao authored and espressif-bot committed Oct 10, 2022
1 parent 5d3af60 commit 9f5ff9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/bt/host/bluedroid/btc/core/btc_dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ void btc_dm_sec_evt(tBTA_DM_SEC_EVT event, tBTA_DM_SEC *data)
msg.pid = BTC_PID_DM_SEC;
msg.act = event;

btc_transfer_context(&msg, (btc_dm_sec_args_t *)data, sizeof(btc_dm_sec_args_t), btc_dm_sec_arg_deep_copy);
btc_transfer_context(&msg, (btc_dm_sec_args_t *)data,
data == NULL ? 0 : sizeof(btc_dm_sec_args_t), btc_dm_sec_arg_deep_copy);
}

static void btc_enable_bluetooth_evt(tBTA_STATUS status)
Expand Down

0 comments on commit 9f5ff9f

Please sign in to comment.