Bläddra i källkod

qcacld-3.0: Make sure NULL pm_ctx pointer not be accessed before initialization

Make sure NULL pm_ctx pointer not be accessed before initialization.
Before initialization, __policy_mgr_check_sta_ap_concurrent_ch_intf
return directly when meet error condition.

Change-Id: I4a96ca7c18d7c524969b8ea95d3bc717cfb0862c
CRs-Fixed: 2642567
Qun Zhang 5 år sedan
förälder
incheckning
3a8d34c8cb
1 ändrade filer med 4 tillägg och 3 borttagningar
  1. 4 3
      components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c

+ 4 - 3
components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c

@@ -1779,20 +1779,21 @@ static void __policy_mgr_check_sta_ap_concurrent_ch_intf(void *data)
 	work_info = data;
 	if (!work_info) {
 		policy_mgr_err("Invalid work_info");
-		goto end;
+		return;
 	}
 
 	psoc = work_info->psoc;
 	if (!psoc) {
 		policy_mgr_err("Invalid psoc");
-		goto end;
+		return;
 	}
 
 	pm_ctx = policy_mgr_get_context(psoc);
 	if (!pm_ctx) {
 		policy_mgr_err("Invalid context");
-		goto end;
+		return;
 	}
+
 	mcc_to_scc_switch =
 		policy_mgr_get_mcc_to_scc_switch_mode(psoc);