From 65ed4b5339946a80505c82ab3bfcdcc367065a81 Mon Sep 17 00:00:00 2001 From: baohongde <1256181400@qq.com> Date: Thu, 31 Mar 2022 22:27:54 +0800 Subject: [PATCH] component/bt: use osi_malloc instead of malloc in bluedroid --- components/bt/host/bluedroid/btc/profile/std/spp/btc_spp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/host/bluedroid/btc/profile/std/spp/btc_spp.c b/components/bt/host/bluedroid/btc/profile/std/spp/btc_spp.c index 025500407f..302836b45c 100644 --- a/components/bt/host/bluedroid/btc/profile/std/spp/btc_spp.c +++ b/components/bt/host/bluedroid/btc/profile/std/spp/btc_spp.c @@ -1132,7 +1132,7 @@ void btc_spp_cb_handler(btc_msg_t *msg) // if rx still has data, delay free slot if (slot->close_alarm == NULL && slot->rx.queue && fixed_queue_length(slot->rx.queue) > 0) { 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; osi_mutex_unlock(&spp_local_param.spp_slot_mutex); BTC_TRACE_ERROR("%s unable to malloc slot close_alarm arg!", __func__);