summaryrefslogtreecommitdiff
path: root/wmi/src
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-06-01 23:08:12 -0700
committerLinux Build Service Account <lnxbuild@localhost>2019-06-01 23:08:12 -0700
commitbd16fbc866ff477266641a71a72c367e2bc74ced (patch)
treee98b489b2529210d79a958a798b82d39afea3d3c /wmi/src
parent6ce8d050aa600c69135d8092a391e83a5f13a3a9 (diff)
parent1083615c2ba0f9f973cc778082f842775e55e19b (diff)
Merge 1083615c2ba0f9f973cc778082f842775e55e19b on remote branch
Change-Id: I6e92e5317e53abc684d516bf629999ef640a7bf1
Diffstat (limited to 'wmi/src')
-rw-r--r--wmi/src/wmi_unified_apf_tlv.c7
-rw-r--r--wmi/src/wmi_unified_tlv.c4
2 files changed, 7 insertions, 4 deletions
diff --git a/wmi/src/wmi_unified_apf_tlv.c b/wmi/src/wmi_unified_apf_tlv.c
index 91ddd7022402..ab9613c4b430 100644
--- a/wmi/src/wmi_unified_apf_tlv.c
+++ b/wmi/src/wmi_unified_apf_tlv.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -211,10 +211,11 @@ extract_apf_read_memory_resp_event_tlv(wmi_unified_t wmi_handle, void *evt_buf,
param_buf->num_data);
return QDF_STATUS_E_INVAL;
}
- resp->length = data_event->length;
- if (resp->length)
+ if (data_event->length && param_buf->data) {
+ resp->length = data_event->length;
resp->data = (uint8_t *)param_buf->data;
+ }
return QDF_STATUS_SUCCESS;
}
diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c
index ac85fe11b9d8..953628eb479b 100644
--- a/wmi/src/wmi_unified_tlv.c
+++ b/wmi/src/wmi_unified_tlv.c
@@ -10895,8 +10895,10 @@ QDF_STATUS send_log_supported_evt_cmd_tlv(wmi_unified_t wmi_handle,
__func__, num_of_diag_events_logs);
/* Free any previous allocation */
- if (wmi_handle->events_logs_list)
+ if (wmi_handle->events_logs_list) {
qdf_mem_free(wmi_handle->events_logs_list);
+ wmi_handle->events_logs_list = NULL;
+ }
if (num_of_diag_events_logs >
(WMI_SVC_MSG_MAX_SIZE / sizeof(uint32_t))) {