Browse Source

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
Dustin Brown 8 years ago
parent
commit
24593f23d2
1 changed files with 3 additions and 4 deletions
  1. 3 4
      core/wma/src/wma_features.c

+ 3 - 4
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));