Skip to content

Commit 72de799

Browse files
Baochen QiangKalle Valo
authored andcommitted
ath11k: Fix memory leak in ath11k_qmi_driver_event_work
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 <[email protected]> Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 8a0b899 commit 72de799

File tree

1 file changed

+3
-1
lines changed
  • drivers/net/wireless/ath/ath11k

1 file changed

+3
-1
lines changed

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

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

2762-
if (test_bit(ATH11K_FLAG_UNREGISTERING, &ab->dev_flags))
2762+
if (test_bit(ATH11K_FLAG_UNREGISTERING, &ab->dev_flags)) {
2763+
kfree(event);
27632764
return;
2765+
}
27642766

27652767
switch (event->type) {
27662768
case ATH11K_QMI_EVENT_SERVER_ARRIVE:

0 commit comments

Comments
 (0)