diff options
author | Johan Hovold <johan@kernel.org> | 2020-07-28 14:10:30 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-28 13:35:44 -0700 |
commit | 63634aa679ba8b5e306ad0727120309ae6ba8a8e (patch) | |
tree | fd008e7972ed161a96e3bd23556c72e1d22e5b4f /drivers | |
parent | 8d8e95fd6d69d774013f51e5f2ee10c6e6d1fc14 (diff) |
net: lan78xx: fix transfer-buffer memory leak
The interrupt URB transfer-buffer was never freed on disconnect or after
probe errors.
Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver")
Cc: Woojung.Huh@microchip.com <Woojung.Huh@microchip.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/usb/lan78xx.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index d7162690e3f3..ee062b27cfa7 100644 --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c @@ -3788,6 +3788,7 @@ static int lan78xx_probe(struct usb_interface *intf, usb_fill_int_urb(dev->urb_intr, dev->udev, dev->pipe_intr, buf, maxp, intr_complete, dev, period); + dev->urb_intr->transfer_flags |= URB_FREE_BUFFER; } } |