From ebc2bbce563ba2f9085279f4b7998a39f1d4250e Mon Sep 17 00:00:00 2001 From: Houston Hoffman Date: Thu, 13 Oct 2016 15:30:52 -0700 Subject: [PATCH] qcacmn: Free pkt in wmi_unified_cmd_send error path The packet is allocated in wmi_unified_cmd_send so if it doesn't get sent or added to a queue it needs to be freed. Change-Id: I763824812d3c0510c53a70caf063568385b9bfc2 CRs-Fixed: 1079509 --- wmi/src/wmi_unified.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wmi/src/wmi_unified.c b/wmi/src/wmi_unified.c index 4cfe7622d9d4..e7a92abade46 100644 --- a/wmi/src/wmi_unified.c +++ b/wmi/src/wmi_unified.c @@ -1843,6 +1843,8 @@ QDF_STATUS wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, qdf_atomic_dec(&wmi_handle->pending_cmds); QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_ERROR, "%s %d, htc_send_pkt failed", __func__, __LINE__); + qdf_mem_free(pkt); + } if (status) return QDF_STATUS_E_FAILURE;