From 657615cc5398f549ebd9ba7e668f541282576642 Mon Sep 17 00:00:00 2001 From: Vignesh Viswanathan Date: Tue, 16 Oct 2018 17:09:14 +0530 Subject: [PATCH] qcacld-3.0: Free sta_self_wmi_rsp if WMA_DELETE_STA_REQ is not queued In wma_self_peer_remove, sta_self_wmi_rsp is allocated and sent as params to wma_fill_hold_req for WMA_DELETE_STA_REQ. However, if wma_fill_hold_req fails and returns NULL, the memory allocated for sta_self_wmi_rsp is not freed leading to memory leak. Free sta_self_wmi_rsp in the error handling case for wma_fill_hold_req in wma_self_peer_remove. Change-Id: I8df840b39284e00a8c8be114c0fec13c3c199fc6 CRs-Fixed: 2334580 --- core/wma/src/wma_dev_if.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index cae5ca8aaa..8d90e4f063 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -551,6 +551,7 @@ static QDF_STATUS wma_self_peer_remove(tp_wma_handle wma_handle, vdev_id); wma_remove_req(wma_handle, vdev_id, WMA_DEL_P2P_SELF_STA_RSP_START); + qdf_mem_free(sta_self_wmi_rsp); qdf_status = QDF_STATUS_E_FAILURE; goto error; }