From 1ae74c4dd44c2430dfdb26dc04cbb82cce95c110 Mon Sep 17 00:00:00 2001 From: Zhao Wei Liang Date: Wed, 18 Sep 2024 15:58:07 +0800 Subject: [PATCH] fix(ble): fixed memory leak issue when using uart hci (cherry picked from commit 4d2c44f511ee00f6e491790e2bc9fbdc6726dbd6) Co-authored-by: zwl --- components/bt/porting/transport/driver/uart/hci_driver_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/porting/transport/driver/uart/hci_driver_uart.c b/components/bt/porting/transport/driver/uart/hci_driver_uart.c index 6ac2a462fa..933a6584ef 100644 --- a/components/bt/porting/transport/driver/uart/hci_driver_uart.c +++ b/components/bt/porting/transport/driver/uart/hci_driver_uart.c @@ -154,7 +154,7 @@ hci_driver_uart_deinit(void) ESP_ERROR_CHECK(uart_driver_delete(s_hci_driver_uart_env.hci_uart_params->hci_uart_port)); - if (!s_hci_driver_uart_env.tx_sem) { + if (s_hci_driver_uart_env.tx_sem) { vSemaphoreDelete(s_hci_driver_uart_env.tx_sem); }