Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d3a4834 authored by Srinivas Girigowda's avatar Srinivas Girigowda Committed by snandini
Browse files

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
parent 1fcd7bef
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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];