Forráskód Böngészése

qcacld-3.0: Fix possible NULL pointer dereference in hdd_twt_configure

Fix possible NULL pointer dereference in hdd_twt_configure.

Change-Id: If7e38923e3d5af0f99be0c7260df6437c4a021ac
CRs-Fixed: 2891438
Srinivas Girigowda 4 éve
szülő
commit
cfb448fdbb
1 módosított fájl, 2 hozzáadás és 1 törlés
  1. 2 1
      core/hdd/src/wlan_hdd_twt.c

+ 2 - 1
core/hdd/src/wlan_hdd_twt.c

@@ -2927,13 +2927,14 @@ static int hdd_twt_configure(struct hdd_adapter *adapter,
 
 	id = QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_OPERATION;
 	twt_oper_attr = tb[id];
-	twt_oper = nla_get_u8(twt_oper_attr);
 
 	if (!twt_oper_attr) {
 		hdd_err("TWT operation NOT specified");
 		return -EINVAL;
 	}
 
+	twt_oper = nla_get_u8(twt_oper_attr);
+
 	id = QCA_WLAN_VENDOR_ATTR_CONFIG_TWT_PARAMS;
 	twt_param_attr = tb[id];