Skip to content

Commit

Permalink
net: lan78xx: fix transfer-buffer memory leak
Browse files Browse the repository at this point in the history
The interrupt URB transfer-buffer was never freed on disconnect or after
probe errors.

Fixes: 55d7de9 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver")
Cc: [email protected] <[email protected]>
Signed-off-by: Johan Hovold <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
jhovold authored and davem330 committed Jul 28, 2020
1 parent 8d8e95f commit 63634aa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/usb/lan78xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 63634aa

Please sign in to comment.