Skip to content

Commit 5a482c9

Browse files
petkomanolovUlrich Hecht
authored andcommitted
net: usb: pegasus: fix memory leak in update_eth_regs_async()
[ Upstream commit afa27621a28af317523e0836dad430bec551eb54 ] When asynchronously writing to the device registers and if usb_submit_urb() fail, the code fail to release allocated to this point resources. Fixes: 323b349 ("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> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Ulrich Hecht <uli@kernel.org>
1 parent 37ed68b commit 5a482c9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/net/usb/pegasus.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ static int update_eth_regs_async(pegasus_t *pegasus)
215215
netif_device_detach(pegasus->net);
216216
netif_err(pegasus, drv, pegasus->net,
217217
"%s returned %d\n", __func__, ret);
218+
usb_free_urb(async_urb);
219+
kfree(req);
218220
}
219221
return ret;
220222
}

0 commit comments

Comments
 (0)