mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
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:
parent
49e0ae2c7d
commit
5c19f06a88
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue