summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanumanth Reddy Pothula <c_hpothu@codeaurora.org>2016-12-02 14:42:17 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-12-05 05:26:36 -0800
commitcfccef5145a7f5c007900aab9105445ade973985 (patch)
tree4950f645e77a15043821ed62e1efe28a7348a6f4
parent6833ac416b75b0af32705da7f4dabece16ed9510 (diff)
qcacld-2.0: dereference ini config object after NULL check
If unload is triggered after re-init sequence failure, there is a possibility of NULL pointer dereference while checking ini parameter values as cfg_ini will be set to NULL on re-init failure Add NULL check for ini config object, before dereferencing it. Change-Id: Id60f6c4bd48ce08c45244a99790eb7ef974f4eba CRs-Fixed: 1096698
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index 702d9436446e..ffcb181d9f7c 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -6582,9 +6582,10 @@ VOS_STATUS hdd_set_idle_ps_config(hdd_context_t *pHddCtx, v_U32_t val)
hdd_config_t *pConfig = pHddCtx->cfg_ini;
VOS_STATUS status = VOS_STATUS_SUCCESS;
- hddLog(LOG1, "hdd_set_idle_ps_config: Enter Val %d", val);
+ hddLog(LOG1, "hdd_set_idle_ps_config: Enter Val %d pconfig %p ",
+ val, pConfig);
- if(pConfig->fIsImpsEnabled)
+ if(pConfig && pConfig->fIsImpsEnabled)
{
status = sme_SetIdlePowersaveConfig(pHddCtx->pvosContext, val);
if(VOS_STATUS_SUCCESS != status)