qcacld-3.0: Add sanity checks in csr macro

Add sanity checks in csr macro CSR_IS_SESSION_VALID
before dereferencing roam session id

Change-Id: Ia17b515c95ba72d03d075fbf881698a82d7eec47
CRs-Fixed: 2747938
This commit is contained in:
Gururaj Pandurangi 2020-08-05 18:11:40 -07:00 • committed by snandini
commit 4e68c1c28d

View file

@ -42,6 +42,8 @@
/* No of sessions to be supported, and a session is for Infra, BT-AMP */
#define CSR_IS_SESSION_VALID(mac, sessionId) \
((sessionId) < WLAN_MAX_VDEVS && \
(mac != NULL) && \
((mac)->roam.roamSession != NULL) && \
(mac)->roam.roamSession[(sessionId)].sessionActive)
#define CSR_GET_SESSION(mac, sessionId) \