From 40805b86f0f0241aa1e4ad303730eef60f7b27c1 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_unified.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wmi_unified.c b/wmi_unified.c index 4cfe7622d9..e7a92abade 100644 --- a/wmi_unified.c +++ b/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;