Browse Source

qcacld-3.0: Validate intf_ch_freq before using it

Validate intf_ch_freq before dereferencing it

Change-Id: Ie30da1f85a77680a6eb4f40e5c6f18f5dddd3153
CRs-Fixed: 2669297
Gururaj Pandurangi 5 years ago
parent
commit
b638f6b5a6
1 changed files with 2 additions and 1 deletions
  1. 2 1
      components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c

+ 2 - 1
components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c

@@ -1381,7 +1381,8 @@ bool policy_mgr_is_sap_restart_required_after_sta_disconnect(
 	uint8_t num_cxn_del = 0;
 	QDF_STATUS status;
 
-	*intf_ch_freq = 0;
+	if (intf_ch_freq)
+		*intf_ch_freq = 0;
 	pm_ctx = policy_mgr_get_context(psoc);
 	if (!pm_ctx) {
 		policy_mgr_err("Invalid pm context");