Sfoglia il codice sorgente

qcacld-3.0: Check pointer before using it in lim_get_update_bw_allow

Should check update_allow firstly, then access it.

Change-Id: I1092530322b4f965f916956712f7260b4e0c3cdc
CRs-Fixed: 3354433
Bing Sun 2 anni fa
parent
commit
6798fa21ee
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      core/mac/src/pe/lim/lim_utils.c

+ 2 - 2
core/mac/src/pe/lim/lim_utils.c

@@ -4881,12 +4881,12 @@ lim_get_update_bw_allow(struct pe_session *session,
 	enum wlan_phymode phy_mode;
 	QDF_STATUS status = QDF_STATUS_E_INVAL;
 
-	*update_allow = false;
-
 	if (!session || !update_allow) {
 		pe_err("invalid input");
 		return status;
 	}
+	*update_allow = false;
+
 	psoc = wlan_vdev_get_psoc(session->vdev);
 	if (!psoc) {
 		pe_err("psoc object invalid");