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
diff --git a/wmi_unified.c b/wmi_unified.c
index 4cfe762..e7a92ab 100644
--- a/wmi_unified.c
+++ b/wmi_unified.c
@@ -1843,6 +1843,8 @@
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;