mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/not_use_malloc_in_bluedroid_v4.2' into 'release/v4.2'
component/bt: use osi_malloc instead of malloc in bluedroid See merge request espressif/esp-idf!18845
This commit is contained in:
commit
221993edd4
@ -1132,7 +1132,7 @@ void btc_spp_cb_handler(btc_msg_t *msg)
|
|||||||
// if rx still has data, delay free slot
|
// if rx still has data, delay free slot
|
||||||
if (slot->close_alarm == NULL && slot->rx.queue && fixed_queue_length(slot->rx.queue) > 0) {
|
if (slot->close_alarm == NULL && slot->rx.queue && fixed_queue_length(slot->rx.queue) > 0) {
|
||||||
tBTA_JV *p_arg = NULL;
|
tBTA_JV *p_arg = NULL;
|
||||||
if ((p_arg = malloc(sizeof(tBTA_JV))) == NULL) {
|
if ((p_arg = osi_malloc(sizeof(tBTA_JV))) == NULL) {
|
||||||
param.close.status = ESP_SPP_NO_RESOURCE;
|
param.close.status = ESP_SPP_NO_RESOURCE;
|
||||||
osi_mutex_unlock(&spp_local_param.spp_slot_mutex);
|
osi_mutex_unlock(&spp_local_param.spp_slot_mutex);
|
||||||
BTC_TRACE_ERROR("%s unable to malloc slot close_alarm arg!", __func__);
|
BTC_TRACE_ERROR("%s unable to malloc slot close_alarm arg!", __func__);
|
||||||
|
Loading…
Reference in New Issue
Block a user