wlan: Don't process tdls_mgmt cfg operation if tdls context is invalid
Return if TDLS context is NULL while processing tdls_mgmt cfg
operation to resolve possible NULL pointer dereference.
Change-Id: I24f70070365e2969d9aa18e039f3b34e12c0e2ef
CRs-Fixed: 2204004
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 40a6177..3bc2d0c 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -19824,6 +19824,7 @@
if (!pHddTdlsCtx) {
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"%s: pHddTdlsCtx not valid.", __func__);
+ return -EINVAL;
}
if (eTDLS_SUPPORT_NOT_ENABLED == pHddCtx->tdls_mode)