From eec28b5d97ddba67083de379c0a6b315ca2d0f0e Mon Sep 17 00:00:00 2001 From: Arif Hussain Date: Tue, 21 Aug 2018 17:21:28 -0700 Subject: [PATCH] qcacld-3.0: Add validation code in wma_set_pmo_caps() Make sure wma is not null before dereferencing. Change-Id: Ie6b8d3c48257de12ae45ffe0a15079642c29cb30 CRs-Fixed: 2299789 --- core/wma/src/wma_main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 63c665a66801..6836d4ea4a13 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -5605,6 +5605,11 @@ static void wma_set_pmo_caps(struct wlan_objmgr_psoc *psoc) struct pmo_device_caps caps; wma = cds_get_context(QDF_MODULE_ID_WMA); + if (!wma) { + WMA_LOGE("%s: wma handler is null", __func__); + return; + } + caps.arp_ns_offload = wmi_service_enabled(wma->wmi_handle, wmi_service_arpns_offload); caps.apf =