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
This commit is contained in:
Srinivas Girigowda 2021-03-03 16:00:44 -08:00 • committed by snandini
commit 5d3a483424

View file

@ -2897,13 +2897,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];