From 79601107296d8c1448658e56eb5b388561d127c0 Mon Sep 17 00:00:00 2001 From: xiongweichao Date: Fri, 9 Jul 2021 14:17:46 +0800 Subject: [PATCH] components/bt: fix spp memory leak closes https://github.com/espressif/esp-idf/issues/7238 --- components/bt/host/bluedroid/btc/profile/std/spp/btc_spp.c | 5 +++++ 1 file changed, 5 insertions(+) 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 a8fe25e352..89b80b4be1 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 @@ -546,6 +546,11 @@ static void btc_spp_uninit(void) osi_mutex_unlock(&spp_local_param.spp_slot_mutex); } while(0); + if (spp_local_param.tx_event_group) { + vEventGroupDelete(spp_local_param.tx_event_group); + spp_local_param.tx_event_group = NULL; + } + if (ret != ESP_SPP_SUCCESS) { esp_spp_cb_param_t param; param.uninit.status = ret;