diff options
| author | Srinivas Girigowda <sgirigow@qca.qualcomm.com> | 2014-03-01 17:23:37 -0800 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-03-04 23:00:36 -0800 |
| commit | 7e3c3a4cba6b3df2a4198a33767648b0133a3724 (patch) | |
| tree | 2f285828fcb46805f306cc2f2734cd23174ecd4a | |
| parent | 0546e3271bbf466ddedb8c304a5d1a455d1f784e (diff) | |
qcacld: Fix HDD issues found by static code analysis
Static source code analysis identified one issue in
wlan_hdd_main.c where pointer was explicitely dereferenced
without a NULL check. Fix this by adding a NULL check
and make sure pointer is deferenced only if it non NULL.
Change-Id: Id86e66c8df3c611c6a70e7535943a4b764f1bbe7
CRs-Fixed: 625032
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_main.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index fdc6e97e4481..74bb4e54f406 100644 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -7562,13 +7562,10 @@ void hdd_deinit_batch_scan(hdd_adapter_t *pAdapter) vos_mem_free((v_VOID_t * )pPrev); } pAdapter->pBatchScanRsp = NULL; + pAdapter->numScanList = 0; + pAdapter->batchScanState = eHDD_BATCH_SCAN_STATE_STOPPED; + pAdapter->prev_batch_id = 0; } - - pAdapter->pBatchScanRsp = NULL; - pAdapter->numScanList = 0; - pAdapter->batchScanState = eHDD_BATCH_SCAN_STATE_STOPPED; - pAdapter->prev_batch_id = 0; - return; } #endif |
