From 7a17a71bb07d5af0de09692c5a0662fb62bc8a60 Mon Sep 17 00:00:00 2001 From: Karthick S Date: Wed, 14 Oct 2015 16:12:48 +0530 Subject: [PATCH] qcacld-3.0: Free protection_fields_reset_timer qcacld-2.0 to qcacld-3.0 propagation Free protection_fields_reset_timer in the beginning of peDeleteSession function to avoid the null defreference caused due to the race condition between peDeleteSession and pe_reset_protection_callback. Change-Id: I1b83977bb3683d6dd87ec94a992ac51f39cd97db CRs-Fixed: 815796 --- core/mac/src/pe/lim/lim_session.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/core/mac/src/pe/lim/lim_session.c b/core/mac/src/pe/lim/lim_session.c index 6c73b4ce2b2f..d6914543e697 100644 --- a/core/mac/src/pe/lim/lim_session.c +++ b/core/mac/src/pe/lim/lim_session.c @@ -539,6 +539,11 @@ void pe_delete_session(tpAniSirGlobal mac_ctx, tpPESession session) tx_timer_deactivate(timer_ptr); } + if (LIM_IS_AP_ROLE(session)) { + cdf_mc_timer_stop(&session->protection_fields_reset_timer); + cdf_mc_timer_destroy(&session->protection_fields_reset_timer); + } + #if defined (WLAN_FEATURE_VOWIFI_11R) /* Delete FT related information */ lim_ft_cleanup(mac_ctx, session); @@ -664,12 +669,6 @@ void pe_delete_session(tpAniSirGlobal mac_ctx, tpPESession session) if (session->limRmfEnabled) cdf_mc_timer_destroy(&session->pmfComebackTimer); #endif - - if (LIM_IS_AP_ROLE(session)) { - cdf_mc_timer_stop(&session->protection_fields_reset_timer); - cdf_mc_timer_destroy(&session->protection_fields_reset_timer); - } - session->valid = false; if (LIM_IS_AP_ROLE(session))