wlan: Fix issues reported by code inspection tool
Address issues found by third party code inspection tool
Change-Id: I873bc845487a72338ef5aaf705c54d005284b45d
CRs-fixed: 555246
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index aa64d3d..1cd0225 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -6258,6 +6258,7 @@
tHalHandle halHandle = WLAN_HDD_GET_HAL_CTX(pAdapter);
u8 *ie;
+ memset(&dot11WPAIE, 0, sizeof(dot11WPAIE));
ie = wlan_hdd_cfg80211_get_ie_ptr (params->ie,
params->ie_len, DOT11F_EID_WPA);
if ( NULL != ie )
diff --git a/CORE/HDD/src/wlan_hdd_debugfs.c b/CORE/HDD/src/wlan_hdd_debugfs.c
index 26ebde0..9d36ff4 100644
--- a/CORE/HDD/src/wlan_hdd_debugfs.c
+++ b/CORE/HDD/src/wlan_hdd_debugfs.c
@@ -117,7 +117,7 @@
const char __user *buf, size_t count, loff_t *ppos)
{
hdd_adapter_t *pAdapter = (hdd_adapter_t *)file->private_data;
- hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
+ hdd_context_t *pHddCtx;
tSirAddPeriodicTxPtrn *addPeriodicTxPtrnParams;
tSirDelPeriodicTxPtrn *delPeriodicTxPtrnParams;
@@ -137,6 +137,8 @@
return -EINVAL;
}
+ pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
+
if (!sme_IsFeatureSupportedByFW(WLAN_PERIODIC_TX_PTRN))
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index 92c4c0f..619adb9 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -3750,6 +3750,8 @@
case WE_SET_11D_STATE:
{
tSmeConfigParams smeConfig;
+ memset(&smeConfig, 0x00, sizeof(smeConfig));
+
if((ENABLE_11D == set_value) || (DISABLE_11D == set_value)) {
sme_GetConfigParam(hHal,&smeConfig);
diff --git a/CORE/VOSS/src/vos_diag.c b/CORE/VOSS/src/vos_diag.c
index 12abd98..4c5e6cc 100644
--- a/CORE/VOSS/src/vos_diag.c
+++ b/CORE/VOSS/src/vos_diag.c
@@ -174,7 +174,9 @@
{
if( ptt_sock_send_msg_to_app(wmsg, 0, ANI_NL_MSG_PUMAC, pHddCtx->ptt_pid) < 0) {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, ("Ptt Socket error sending message to the app!!\n"));
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ ("Ptt Socket error sending message to the app!!\n"));
+ vos_mem_free((v_VOID_t *)wmsg);
return;
}
@@ -249,8 +251,9 @@
memcpy(pBuf, pPayload,length);
if( ptt_sock_send_msg_to_app(wmsg, 0, ANI_NL_MSG_PUMAC, pHddCtx->ptt_pid) < 0) {
-
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, ("Ptt Socket error sending message to the app!!\n"));
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ ("Ptt Socket error sending message to the app!!\n"));
+ vos_mem_free((v_VOID_t*)wmsg);
return;
}
diff --git a/CORE/WDI/CP/src/wlan_qct_wdi.c b/CORE/WDI/CP/src/wlan_qct_wdi.c
index af6698e..04a4ff9 100644
--- a/CORE/WDI/CP/src/wlan_qct_wdi.c
+++ b/CORE/WDI/CP/src/wlan_qct_wdi.c
@@ -11073,6 +11073,7 @@
{
WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
"%s: Failed to get selfStaIdx!", __func__);
+ wpalMemoryFree(pSendBuffer);
return WDI_STATUS_E_FAILURE;
}
@@ -11165,6 +11166,7 @@
{
WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
"%s: Failed to get selfStaIdx!", __func__);
+ wpalMemoryFree(pSendBuffer);
return WDI_STATUS_E_FAILURE;
}
@@ -27162,9 +27164,6 @@
WDI_GtkOffloadCb wdiGtkOffloadCb = NULL;
tHalGtkOffloadRspParams halGtkOffloadRspParams;
WDI_GtkOffloadRspParams wdiGtkOffloadRsparams;
- /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
-
- wdiGtkOffloadCb = (WDI_GtkOffloadCb)pWDICtx->pfncRspCB;
/*-------------------------------------------------------------------------
Sanity check
@@ -27178,6 +27177,8 @@
return WDI_STATUS_E_FAILURE;
}
+ wdiGtkOffloadCb = (WDI_GtkOffloadCb)pWDICtx->pfncRspCB;
+
/*-------------------------------------------------------------------------
Extract response and send it to UMAC
-------------------------------------------------------------------------*/
@@ -27226,9 +27227,6 @@
WDI_GtkOffloadGetInfoRspParams wdiGtkOffloadGetInfoRsparams;
WDI_BSSSessionType* pBSSSes = NULL;
- /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
-
- wdiGtkOffloadGetInfoCb = (WDI_GtkOffloadGetInfoCb)pWDICtx->pfncRspCB;
/*-------------------------------------------------------------------------
Sanity check
@@ -27242,7 +27240,9 @@
return WDI_STATUS_E_FAILURE;
}
- /*-------------------------------------------------------------------------
+ wdiGtkOffloadGetInfoCb = (WDI_GtkOffloadGetInfoCb)pWDICtx->pfncRspCB;
+
+ /*-------------------------------------------------------------------------
Extract response and send it to UMAC
-------------------------------------------------------------------------*/
if(WDI_getFwWlanFeatCaps(SLM_SESSIONIZATION))