diff options
| author | tinlin <tinlin@codeaurora.org> | 2019-04-15 11:15:36 +0800 |
|---|---|---|
| committer | tinlin <tinlin@codeaurora.org> | 2019-04-15 14:56:28 +0800 |
| commit | f2aa245a1582ba72cf1f1bb0830de7b0d8a12dd4 (patch) | |
| tree | af5269b041a3f0dd85c139acf8cfc800063c8735 | |
| parent | 101e80bdd83804808d2a672311c65986071e55c5 (diff) | |
qcacld-2.0: Add coverity change
Add check for division cfgValue1. Set pointer to NULL
after calling vos_mem_free.
Change-Id: Ic7922bb5c5be9e840afda463d077631662033dc5
CRs-Fixed: 2435159
| -rw-r--r-- | CORE/MAC/src/pe/lim/limTimerUtils.c | 3 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrApiRoam.c | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/CORE/MAC/src/pe/lim/limTimerUtils.c b/CORE/MAC/src/pe/lim/limTimerUtils.c index d6180093916c..73131b4177d7 100644 --- a/CORE/MAC/src/pe/lim/limTimerUtils.c +++ b/CORE/MAC/src/pe/lim/limTimerUtils.c @@ -159,7 +159,8 @@ limCreateTimers(tpAniSirGlobal pMac) cfgValue = SYS_MS_TO_TICKS(cfgValue); /* Limiting max number of probe req for each channel scan */ - pMac->lim.maxProbe = (cfgValue/cfgValue1); + if (cfgValue1) + pMac->lim.maxProbe = (cfgValue/cfgValue1); if (tx_timer_create(&pMac->lim.limTimers.gLimMaxChannelTimer, "MAX CHANNEL TIMEOUT", diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c index 3f9c721fca22..78edfc28d689 100644 --- a/CORE/SME/src/csr/csrApiRoam.c +++ b/CORE/SME/src/csr/csrApiRoam.c @@ -11496,10 +11496,14 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg ) } if(!HAL_STATUS_SUCCESS(status)) { - if(pRoamInfo->pbFrames) + if(pRoamInfo->pbFrames) { vos_mem_free(pRoamInfo->pbFrames); - if(pRoamInfo->pBssDesc) + pRoamInfo->pbFrames = NULL; + } + if(pRoamInfo->pBssDesc) { vos_mem_free(pRoamInfo->pBssDesc); + pRoamInfo->pBssDesc = NULL; + } } } if ((eCSR_ENCRYPT_TYPE_NONE == |
