* [Patch] Memory leak in drivers/usb/serial/airprime.c
@ 2006-10-05 10:31 Eric Sesterhenn
2006-10-06 18:58 ` Andy Gay
0 siblings, 1 reply; 2+ messages in thread
From: Eric Sesterhenn @ 2006-10-05 10:31 UTC (permalink / raw)
To: linux-kernel; +Cc: andy
hi,
the commit http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=5dda171202f94127e49c12daf780cdae1b4e668b
added a memory leak. In case we cant allocate an urb, we dont free
the buffer and leak it. Coverity id #1438
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
--- linux-2.6.19-rc1/drivers/usb/serial/airprime.c.orig 2006-10-05 12:25:56.000000000 +0200
+++ linux-2.6.19-rc1/drivers/usb/serial/airprime.c 2006-10-05 12:26:35.000000000 +0200
@@ -133,6 +133,7 @@ static int airprime_open(struct usb_seri
}
urb = usb_alloc_urb(0, GFP_KERNEL);
if (!urb) {
+ kfree(buffer);
dev_err(&port->dev, "%s - no more urbs?\n",
__FUNCTION__);
result = -ENOMEM;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Patch] Memory leak in drivers/usb/serial/airprime.c
2006-10-05 10:31 [Patch] Memory leak in drivers/usb/serial/airprime.c Eric Sesterhenn
@ 2006-10-06 18:58 ` Andy Gay
0 siblings, 0 replies; 2+ messages in thread
From: Andy Gay @ 2006-10-06 18:58 UTC (permalink / raw)
To: Eric Sesterhenn; +Cc: linux-kernel
Hmm. And I really thought I'd plugged all the leaks....
Acked-by: Andy Gay <andy@andynet.net>
On Thu, 2006-10-05 at 12:31 +0200, Eric Sesterhenn wrote:
> hi,
>
> the commit http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=5dda171202f94127e49c12daf780cdae1b4e668b
> added a memory leak. In case we cant allocate an urb, we dont free
> the buffer and leak it. Coverity id #1438
>
> Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
>
> --- linux-2.6.19-rc1/drivers/usb/serial/airprime.c.orig 2006-10-05 12:25:56.000000000 +0200
> +++ linux-2.6.19-rc1/drivers/usb/serial/airprime.c 2006-10-05 12:26:35.000000000 +0200
> @@ -133,6 +133,7 @@ static int airprime_open(struct usb_seri
> }
> urb = usb_alloc_urb(0, GFP_KERNEL);
> if (!urb) {
> + kfree(buffer);
> dev_err(&port->dev, "%s - no more urbs?\n",
> __FUNCTION__);
> result = -ENOMEM;
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-06 19:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-05 10:31 [Patch] Memory leak in drivers/usb/serial/airprime.c Eric Sesterhenn
2006-10-06 18:58 ` Andy Gay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox