Skip to content

Commit 08fb000

Browse files
Baochen Qianggregkh
authored andcommitted
ath11k: Fix memory leak in ath11k_qmi_driver_event_work
[ Upstream commit 72de799 ] The buffer pointed to by event is not freed in case ATH11K_FLAG_UNREGISTERING bit is set, resulting in memory leak, so fix it. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Fixes: d5c6515 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Baochen Qiang <bqiang@codeaurora.org> Signed-off-by: Jouni Malinen <jouni@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210913180246.193388-4-jouni@codeaurora.org Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 4519fb9 commit 08fb000

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • drivers/net/wireless/ath/ath11k

drivers/net/wireless/ath/ath11k/qmi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2616,8 +2616,10 @@ static void ath11k_qmi_driver_event_work(struct work_struct *work)
26162616
list_del(&event->list);
26172617
spin_unlock(&qmi->event_lock);
26182618

2619-
if (test_bit(ATH11K_FLAG_UNREGISTERING, &ab->dev_flags))
2619+
if (test_bit(ATH11K_FLAG_UNREGISTERING, &ab->dev_flags)) {
2620+
kfree(event);
26202621
return;
2622+
}
26212623

26222624
switch (event->type) {
26232625
case ATH11K_QMI_EVENT_SERVER_ARRIVE:

0 commit comments

Comments
 (0)