]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ath11k: Fix possible memleak in ath11k_qmi_init_service
authorWang Yufen <wangyufen@huawei.com>
Mon, 20 Jul 2020 09:36:44 +0000 (17:36 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:11:12 +0000 (10:11 +0100)
[ Upstream commit 28f1632118818d9dccabf4c0fccfe49686742317 ]

When qmi_add_lookup fail, we should destroy the workqueue

Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Yufen <wangyufen@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1595237804-66297-1-git-send-email-wangyufen@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath11k/qmi.c

index c00a99ad8dbc112616b1eab6010419fc82dacc51..497cff7e64cc5bb58d1e4a3378141bfd363e32a5 100644 (file)
@@ -2419,6 +2419,7 @@ int ath11k_qmi_init_service(struct ath11k_base *ab)
                             ATH11K_QMI_WLFW_SERVICE_INS_ID_V01);
        if (ret < 0) {
                ath11k_warn(ab, "failed to add qmi lookup\n");
+               destroy_workqueue(ab->qmi.event_wq);
                return ret;
        }