Bläddra i källkod

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
Karthick S 9 år sedan
förälder
incheckning
7a17a71bb0
1 ändrade filer med 5 tillägg och 6 borttagningar
  1. 5 6
      core/mac/src/pe/lim/lim_session.c

+ 5 - 6
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))