Skip to content

Commit ce6eef7

Browse files
petkomanolovgregkh
authored andcommitted
net: usb: pegasus: fix memory leak in update_eth_regs_async()
[ Upstream commit afa2762 ] 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>
1 parent 51ffd44 commit ce6eef7

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
@@ -168,6 +168,8 @@ static int update_eth_regs_async(pegasus_t *pegasus)
168168
netif_device_detach(pegasus->net);
169169
netif_err(pegasus, drv, pegasus->net,
170170
"%s returned %d\n", __func__, ret);
171+
usb_free_urb(async_urb);
172+
kfree(req);
171173
}
172174
return ret;
173175
}

0 commit comments

Comments
 (0)