wlan: Out of scope object reference in hdd_hostapd_SAPEventCB()
Static source code analysis identified an issue where a pointer to
"struct iw_michaelmicfailure msg" was being referenced outside its
scope. Relocate the definition so that it will still be in scope
when the pointer to it is referenced.
Change-Id: I7ff80ce2e0934ecf0ebd1a4f492e8761d4b0f5d8
CRs-fixed: 470188
diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c
index bfe4715..aa0fc90 100644
--- a/CORE/HDD/src/wlan_hdd_hostapd.c
+++ b/CORE/HDD/src/wlan_hdd_hostapd.c
@@ -456,6 +456,7 @@
char *startBssEvent;
hdd_context_t *pHddCtx;
hdd_scaninfo_t *pScanInfo = NULL;
+ struct iw_michaelmicfailure msg;
dev = (struct net_device *)usrDataForCallback;
pHostapdAdapter = netdev_priv(dev);
@@ -565,7 +566,6 @@
return VOS_STATUS_SUCCESS;
case eSAP_STA_MIC_FAILURE_EVENT:
{
- struct iw_michaelmicfailure msg;
memset(&msg, '\0', sizeof(msg));
msg.src_addr.sa_family = ARPHRD_ETHER;
memcpy(msg.src_addr.sa_data, &pSapEvent->sapevt.sapStationMICFailureEvent.staMac, sizeof(v_MACADDR_t));