From 7e3c3a4cba6b3df2a4198a33767648b0133a3724 Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Sat, 1 Mar 2014 17:23:37 -0800 Subject: 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 --- CORE/HDD/src/wlan_hdd_main.c | 9 +++------ 1 file 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 -- cgit v1.2.3