Skip to content

Commit 9b955d5

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 f3ccc87 commit 9b955d5

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
@@ -2707,8 +2707,10 @@ static void ath11k_qmi_driver_event_work(struct work_struct *work)
27072707
list_del(&event->list);
27082708
spin_unlock(&qmi->event_lock);
27092709

2710-
if (test_bit(ATH11K_FLAG_UNREGISTERING, &ab->dev_flags))
2710+
if (test_bit(ATH11K_FLAG_UNREGISTERING, &ab->dev_flags)) {
2711+
kfree(event);
27112712
return;
2713+
}
27122714

27132715
switch (event->type) {
27142716
case ATH11K_QMI_EVENT_SERVER_ARRIVE:

0 commit comments

Comments
 (0)