From a0992ad4427e7400808c30c7055554a35c14e6d9 Mon Sep 17 00:00:00 2001 From: yulong Date: Thu, 30 Nov 2017 16:15:22 +0800 Subject: [PATCH] component/bt: Remove the p_tle->param reset to 0 when free the p_timer_param pointer. --- components/bt/bluedroid/bta/gatt/bta_gattc_act.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/bt/bluedroid/bta/gatt/bta_gattc_act.c b/components/bt/bluedroid/bta/gatt/bta_gattc_act.c index cc3e08494d..3196ffb678 100644 --- a/components/bt/bluedroid/bta/gatt/bta_gattc_act.c +++ b/components/bt/bluedroid/bta/gatt/bta_gattc_act.c @@ -2358,6 +2358,7 @@ static void bta_gattc_wait4_service_change_ccc_cback (TIMER_LIST_ENT *p_tle) osi_mutex_lock(&write_ccc_mutex, OSI_MUTEX_MAX_TIMEOUT); tBTA_GATTC_WAIT_CCC_TIMER *p_timer_param = (tBTA_GATTC_WAIT_CCC_TIMER*) p_tle->param; + p_tle->param = (TIMER_PARAM_TYPE)0; if (p_timer_param == NULL){ APPL_TRACE_ERROR("p_timer_param is NULL in %s\n", __func__); return; @@ -2367,7 +2368,6 @@ static void bta_gattc_wait4_service_change_ccc_cback (TIMER_LIST_ENT *p_tle) if (p_conn == NULL){ APPL_TRACE_ERROR("p_conn is NULL in %s\n", __func__); osi_free(p_timer_param); - p_tle->param = (TIMER_PARAM_TYPE)0; return; } @@ -2399,7 +2399,6 @@ static void bta_gattc_wait4_service_change_ccc_cback (TIMER_LIST_ENT *p_tle) } osi_free(p_timer_param); - p_tle->param = (TIMER_PARAM_TYPE)0; osi_mutex_unlock(&write_ccc_mutex); } -- 2.40.0