From dfeeaf386e1f38477051eadf2a3a765e407d4fca Mon Sep 17 00:00:00 2001 From: xiongweichao Date: Tue, 27 Feb 2024 17:14:13 +0800 Subject: [PATCH] fix(bt/bluedorid): Fixed crash caused by using illegal pointer --- components/bt/host/bluedroid/btc/profile/std/sdp/btc_sdp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/bt/host/bluedroid/btc/profile/std/sdp/btc_sdp.c b/components/bt/host/bluedroid/btc/profile/std/sdp/btc_sdp.c index f93e10f2e5..6eaf6cfb52 100644 --- a/components/bt/host/bluedroid/btc/profile/std/sdp/btc_sdp.c +++ b/components/bt/host/bluedroid/btc/profile/std/sdp/btc_sdp.c @@ -285,8 +285,8 @@ static int free_sdp_slot(int id) // Record have already been freed handle = -1; } - osi_free(slot); - slot = NULL; + osi_free(sdp_local_param.sdp_slots[id]); + sdp_local_param.sdp_slots[id] = NULL; return handle; }