projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a4e305e
)
net: usb: pegasus: fix memory leak in update_eth_regs_async()
author
Petko Manolov
<petkan@nucleusys.com>
Tue, 6 Jan 2026 08:48:21 +0000
(10:48 +0200)
committer
Jakub Kicinski
<kuba@kernel.org>
Thu, 8 Jan 2026 16:40:20 +0000
(08:40 -0800)
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 <petkan@nucleusys.com>
Link:
https://patch.msgid.link/20260106084821.3746677-1-petko.manolov@konsulko.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/usb/pegasus.c
patch
|
blob
|
history
diff --git
a/drivers/net/usb/pegasus.c
b/drivers/net/usb/pegasus.c
index
81ca64d
..
c514483
100644
(file)
--- a/
drivers/net/usb/pegasus.c
+++ b/
drivers/net/usb/pegasus.c
@@
-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;
}