Patch "wifi: plfxlc: fix potential memory leak in __lf_x_usb_enable_rx()" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    wifi: plfxlc: fix potential memory leak in __lf_x_usb_enable_rx()

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     wifi-plfxlc-fix-potential-memory-leak-in-__lf_x_usb_.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f9938aaaa6c9594d53037b072c08f3f2efe414c1
Author: Ziyang Xuan <william.xuanziyang@xxxxxxxxxx>
Date:   Sat Nov 19 13:19:00 2022 +0800

    wifi: plfxlc: fix potential memory leak in __lf_x_usb_enable_rx()
    
    [ Upstream commit 895b3b06efc285c1245242e9638b9ae251dc13ec ]
    
    urbs does not be freed in exception paths in __lf_x_usb_enable_rx().
    That will trigger memory leak. To fix it, add kfree() for urbs within
    "error" label. Compile tested only.
    
    Fixes: 68d57a07bfe5 ("wireless: add plfxlc driver for pureLiFi X, XL, XC devices")
    Signed-off-by: Ziyang Xuan <william.xuanziyang@xxxxxxxxxx>
    Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221119051900.1192401-1-william.xuanziyang@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/purelifi/plfxlc/usb.c b/drivers/net/wireless/purelifi/plfxlc/usb.c
index 39e54b3787d6..76d0a778636a 100644
--- a/drivers/net/wireless/purelifi/plfxlc/usb.c
+++ b/drivers/net/wireless/purelifi/plfxlc/usb.c
@@ -247,6 +247,7 @@ static int __lf_x_usb_enable_rx(struct plfxlc_usb *usb)
 		for (i = 0; i < RX_URBS_COUNT; i++)
 			free_rx_urb(urbs[i]);
 	}
+	kfree(urbs);
 	return r;
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux