Răsfoiți Sursa

qcacld-3.0: Do not try to free if wmi tlv is null after wake up

Trying to free a null WMI TLV struct leads to confusing error message.
Do not try to free WMI TLV struct if it was not allocated.

Change-Id: Ic9607179aa5b7dd517f3187716279d0c02199117
CRs-Fixed: 1059077
Rajeev Kumar 8 ani în urmă
părinte
comite
2c892fe7e9
1 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 3 1
      core/wma/src/wma_features.c

+ 3 - 1
core/wma/src/wma_features.c

@@ -3367,7 +3367,9 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event,
 		WMA_LOGA("Holding %d msec wake_lock", wake_lock_duration);
 	}
 
-	wmitlv_free_allocated_event_tlvs(event_id, &wmi_cmd_struct_ptr);
+	if (wmi_cmd_struct_ptr)
+		wmitlv_free_allocated_event_tlvs(event_id, &wmi_cmd_struct_ptr);
+
 	return 0;
 }