From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hnO4d-0006Tm-79 for ath11k@lists.infradead.org; Tue, 16 Jul 2019 14:04:56 +0000 From: Karthikeyan Periyasamy Subject: [PATCH] ath11k: fix memory leak in testmode Date: Tue, 16 Jul 2019 19:34:32 +0530 Message-Id: <1563285872-13408-1-git-send-email-periyasa@codeaurora.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ath11k" Errors-To: ath11k-bounces+kvalo=adurom.com@lists.infradead.org To: ath11k@lists.infradead.org Cc: Karthikeyan Periyasamy when ath11k_wmi_cmd_send() fails, caller need to free up the skb. In ath11k_tm_cmd_wmi(), skb free not happen when wmi command send fails. so free up the skb in the error case. Signed-off-by: Karthikeyan Periyasamy --- drivers/net/wireless/ath/ath11k/testmode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath11k/testmode.c b/drivers/net/wireless/ath/ath11k/testmode.c index 96ed2d2..9274b6c 100644 --- a/drivers/net/wireless/ath/ath11k/testmode.c +++ b/drivers/net/wireless/ath/ath11k/testmode.c @@ -160,6 +160,7 @@ static int ath11k_tm_cmd_wmi(struct ath11k *ar, struct nlattr *tb[]) ret = ath11k_wmi_cmd_send(wmi, skb, cmd_id); if (ret) { + dev_kfree_skb(skb); ath11k_warn(ar->ab, "failed to transmit wmi command (testmode): %d\n", ret); goto out; -- 1.9.1 _______________________________________________ ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k