summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authormatthieu castet <castet.matthieu@free.fr>2006-04-02 18:45:46 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2006-04-14 11:12:23 -0700
commit4d45e21867bee51e3bb42e95bc2929231d7c8192 (patch)
treea5ff1c57145b09b3e6f22b6db5fb1c94a970dcf5 /drivers/usb
parent584958c3d2985396bdb6f96ae632971b43f6f984 (diff)
downloadblackbird-op-linux-4d45e21867bee51e3bb42e95bc2929231d7c8192.tar.gz
blackbird-op-linux-4d45e21867bee51e3bb42e95bc2929231d7c8192.zip
[PATCH] USB: UEAGLE : memory leack fix
this patch fix leak of memory allocated to intr if allocation of sc->urb_int fails. Found by the Coverity checker. Signed-off-by: Duncan Sands <baldrick@free.fr> Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/atm/ueagle-atm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index 047fb4ea2fa6..b38990adf1cd 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -1376,7 +1376,7 @@ static int uea_boot(struct uea_softc *sc)
if (ret < 0) {
uea_err(INS_TO_USBDEV(sc),
"urb submition failed with error %d\n", ret);
- goto err1;
+ goto err;
}
sc->kthread = kthread_run(uea_kthread, sc, "ueagle-atm");
@@ -1390,10 +1390,10 @@ static int uea_boot(struct uea_softc *sc)
err2:
usb_kill_urb(sc->urb_int);
-err1:
- kfree(intr);
err:
usb_free_urb(sc->urb_int);
+ sc->urb_int = NULL;
+ kfree(intr);
uea_leaves(INS_TO_USBDEV(sc));
return -ENOMEM;
}
OpenPOWER on IntegriCloud