]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ath10k: Fix memory leak in qmi
authorDundi Raviteja <dundi@codeaurora.org>
Tue, 25 Jun 2019 14:25:48 +0000 (19:55 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2019 07:12:46 +0000 (09:12 +0200)
[ Upstream commit c709df58832c5f575f0255bea4b09ad477fc62ea ]

Currently the memory allocated for qmi handle is
not being freed during de-init which leads to memory leak.

Free the allocated qmi memory in qmi deinit
to avoid memory leak.

Tested HW: WCN3990
Tested FW: WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1

Fixes: fda6fee0001e ("ath10k: add QMI message handshake for wcn3990 client")
Signed-off-by: Dundi Raviteja <dundi@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath10k/qmi.c

index a7bc2c70d076bca6cbadc76ca6d44dffe6da85aa..8f8f717a23eeae24b1839edb7099fb964c262aeb 100644 (file)
@@ -1002,6 +1002,7 @@ int ath10k_qmi_deinit(struct ath10k *ar)
        qmi_handle_release(&qmi->qmi_hdl);
        cancel_work_sync(&qmi->event_work);
        destroy_workqueue(qmi->event_wq);
+       kfree(qmi);
        ar_snoc->qmi = NULL;
 
        return 0;