From 24593f23d27ff8ecea3c3dfbf03e6800867578ed Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Tue, 18 Apr 2017 13:50:39 -0700 Subject: [PATCH] qcacld-3.0: Allocate memory for NLO match wake event A recent change to the Network Listen Offload (NLO) match wake event handler creates and uses a pointer without allocating any memory for it. Allocate memory for the nlo_event structure before use in the NLO match wake event handler. Change-Id: I29ed111e08c8a2d3cd8f8b5e9ca5332a502f9c1a CRs-Fixed: 2035239 --- core/wma/src/wma_features.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index dccc1f4ac85b..fed7fb3a3772 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -2823,12 +2823,11 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event, uint32_t len) case WOW_REASON_NLOD: if (wma_vdev) { WMI_NLO_MATCH_EVENTID_param_tlvs nlo_param; - wmi_nlo_event *nlo_event; + wmi_nlo_event nlo_event; WMA_LOGD("NLO match happened"); - - nlo_event = nlo_param.fixed_param; - nlo_event->vdev_id = wake_info->vdev_id; + nlo_param.fixed_param = &nlo_event; + nlo_event.vdev_id = wake_info->vdev_id; target_if_nlo_match_event_handler(handle, (uint8_t *)&nlo_param, sizeof(nlo_param));