From a8193944eccfee7a18cba496ca409cce0269c9ac Mon Sep 17 00:00:00 2001 From: tinlin Date: Fri, 30 Aug 2019 15:14:13 +0800 Subject: [PATCH] qcacld-3.0: Possible null pointer dereference cds_cfg is assigned the return value from function cds_get_ini_config. cds_cfg may be null pointer. Add null pointer check before cds_cfg is dereferenced. Change-Id: I184c0a589fa660c5c49cd951986ad918cbc42bcd CRs-Fixed: 2518433 --- core/cds/src/cds_sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/cds/src/cds_sched.c b/core/cds/src/cds_sched.c index 69e3c080b5e3..1f9c866a8893 100644 --- a/core/cds/src/cds_sched.c +++ b/core/cds/src/cds_sched.c @@ -191,7 +191,7 @@ static int cds_sched_find_attach_cpu(p_cds_sched_context pSchedContext, if (!cpumask_equal(&pSchedContext->rx_thread_cpu_mask, &new_mask)) { cds_cfg = cds_get_ini_config(); cpumask_copy(&pSchedContext->rx_thread_cpu_mask, &new_mask); - if (cds_cfg->enable_dp_rx_threads) + if (cds_cfg && cds_cfg->enable_dp_rx_threads) dp_txrx_set_cpu_mask(cds_get_context(QDF_MODULE_ID_SOC), &new_mask); else