net: usb: pegasus: fix memory leak in update_eth_regs_async()
Subsystems (5)
PATCH v2 1/1 net: usb: pegasus: fix memory leak in update_eth_regs_async()
From: Petko Manolov <[email protected]>
When asynchronously writing to the device registers and if usb_submit_urb() fail, the code fail to release allocated to this point resources.
Fixes 323b34963d11 ("drivers: net: usb: pegasus: fix control urb submission")
Signed-off-by Petko Manolov <[email protected]>
---
v2:
- replace the auto-cleanup form with the classic kfree();
drivers/net/usb/pegasus.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/usb/pegasus.c +2 -0
@@ -168,6 +168,8 @@ static int update_eth_regs_async(pegasus_t *pegasus)netif_device_detach (pegasus->net);netif_err (pegasus, drv, pegasus->net,"%s returned %d\n" , __func__, ret); +usb_free_urb (async_urb); +kfree (req); }return ret; }
Signature · 1 line
2.52.0
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Tue, 6 Jan 2026 10:48:21 +0200 you wrote:
From: Petko Manolov <[email protected]>
When asynchronously writing to the device registers and if
usb_submit_urb()fail, the code fail to release allocated to this point resources.Fixes 323b34963d11 ("drivers: net: usb: pegasus: fix control urb submission")Signed-off-by Petko Manolov <[email protected]>[...]
Here is the summary with links:
- [NET,v2,1/1] net: usb: pegasus: fix memory leak in update_eth_regs_async()
https://git.kernel.org/netdev/net/c/afa27621a28a
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html