Fix more bugs found during static code analysis
Fix miscellaneous bugs found by static source code analysis
Change-Id: Ia84018c213d4731d51044f84c74407a5aac51326
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 338c816..765620e 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -3951,6 +3951,7 @@
if(chan == NULL)
{
hddLog(VOS_TRACE_LEVEL_INFO, "%s chan pointer is NULL", __func__);
+ kfree(mgmt);
return NULL;
}
/*To keep the rssi icon of the connected AP in the scan window
@@ -7106,10 +7107,10 @@
"NL80211_TDLS_UNKONW_OPER"};
#endif
- if( NULL == pHddCtx || NULL == pHddCtx->cfg_ini )
+ if ( NULL == pHddCtx || NULL == pHddCtx->cfg_ini || NULL == peer )
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "Invalid arguments");
+ "%s: Invalid arguments", __func__);
return -EINVAL;
}
@@ -7134,8 +7135,8 @@
FALSE == sme_IsFeatureSupportedByFW(TDLS))
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "TDLS Disabled in INI OR not enabled in FW.\
- Cannot process TDLS commands \n");
+ "TDLS Disabled in INI OR not enabled in FW. "
+ "Cannot process TDLS commands");
return -ENOTSUPP;
}