Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-09-10 19:19:54 +0200
committerTakashi Iwai <tiwai@suse.de>2019-09-10 19:20:12 +0200
commit2fa676c2227f315d848c4129b07e6b4202fc5955 (patch)
treef3cc17e40bbe23fded3319ace866d186d939f06a
parentcce425868941e14b62bc4a5ec45a3048bd765f30 (diff)
lan78xx: Fix memory leaks (bsc#1051510).
-rw-r--r--drivers/net/usb/lan78xx.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index a5ead2dc0b05..0f0f55a5e412 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -3705,7 +3705,7 @@ static int lan78xx_probe(struct usb_interface *intf,
ret = register_netdev(netdev);
if (ret != 0) {
netif_err(dev, probe, netdev, "couldn't register the device\n");
- goto out3;
+ goto out4;
}
usb_set_intfdata(intf, dev);
@@ -3720,12 +3720,14 @@ static int lan78xx_probe(struct usb_interface *intf,
ret = lan78xx_phy_init(dev);
if (ret < 0)
- goto out4;
+ goto out5;
return 0;
-out4:
+out5:
unregister_netdev(netdev);
+out4:
+ usb_free_urb(dev->urb_intr);
out3:
lan78xx_unbind(dev, intf);
out2: