* [PATCH 4/4] UEAGLE : memory leack fix
@ 2006-04-02 16:39 matthieu castet
2006-04-02 16:45 ` matthieu castet
0 siblings, 1 reply; 2+ messages in thread
From: matthieu castet @ 2006-04-02 16:39 UTC (permalink / raw)
To: greg; +Cc: linux-kernel, usbatm, linux-usb-devel, ueagle
[-- Attachment #1: Type: text/plain, Size: 228 bytes --]
Hi,
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>
[-- Attachment #2: ueagle4.patch --]
[-- Type: text/plain, Size: 580 bytes --]
Index: ueagle-atm.c
===================================================================
--- ueagle-atm.c (révision 266)
+++ ueagle-atm.c (révision 267)
@@ -1376,7 +1376,7 @@
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 @@
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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH 4/4] UEAGLE : memory leack fix
2006-04-02 16:39 [PATCH 4/4] UEAGLE : memory leack fix matthieu castet
@ 2006-04-02 16:45 ` matthieu castet
0 siblings, 0 replies; 2+ messages in thread
From: matthieu castet @ 2006-04-02 16:45 UTC (permalink / raw)
To: greg; +Cc: linux-kernel, usbatm, linux-usb-devel, ueagle
[-- Attachment #1: Type: text/plain, Size: 297 bytes --]
matthieu castet wrote:
> Hi,
>
> this patch fix leak of memory allocated to intr if allocation of
> sc->urb_int fails.
> Found by the Coverity checker.
>
add correct path for the file name
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
[-- Attachment #2: ueagle4.patch --]
[-- Type: text/plain, Size: 642 bytes --]
Index: ueagle-atm.c
===================================================================
--- linux-2.6.15.old/drivers/usb/atm/ueagle-atm.c (révision 266)
+++ linux-2.6.15/drivers/usb/atm/ueagle-atm.c (révision 267)
@@ -1376,7 +1376,7 @@
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 @@
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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-04-02 16:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-02 16:39 [PATCH 4/4] UEAGLE : memory leack fix matthieu castet
2006-04-02 16:45 ` matthieu castet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox