Skip to content

Commit

Permalink
[PATCH] USB: UEAGLE : memory leack fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
matthieu castet authored and Greg Kroah-Hartman committed Apr 14, 2006
1 parent 584958c commit 4d45e21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/usb/atm/ueagle-atm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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;
}
Expand Down

0 comments on commit 4d45e21

Please sign in to comment.