qcacld-3.0: Check NULL value of params

In hdd_sap_twt_get_session_params(), check NULL value of
params variable before it's used.

Change-Id: I47e57cbe98d7a0ee7015ab628d665037bf0b9853
CRs-Fixed: 2989510
This commit is contained in:
Deeksha Gupta 2021-07-13 07:35:19 +05:30 • committed by Madan Koyyalamudi
commit 5c19f06a88

View file

@ -828,6 +828,9 @@ static int hdd_sap_twt_get_session_params(struct hdd_adapter *adapter,
params = qdf_mem_malloc(TWT_PEER_MAX_SESSIONS * max_num_peer *
sizeof(*params));
if (!params)
return -ENOMEM;
params[0].vdev_id = adapter->vdev_id;
id = QCA_WLAN_VENDOR_ATTR_TWT_SETUP_FLOW_ID;
id1 = QCA_WLAN_VENDOR_ATTR_TWT_SETUP_MAC_ADDR;