2009-11-20 08:17:34

by Martin Schiller

[permalink] [raw]
Subject: [PATCH 1/3] hso: memory leak in hso_serial_common_free()


This patch fixes a memory leak in the hso_serial_common_free() function.
The tx_buffer of a serial device was never freed here.

Signed-off-by: Martin Schiller <[email protected]>
---

--- linux-2.6.32-rc7-git3/drivers/net/usb/hso.c.orig 2009-11-19 08:54:08.000000000 +0100
+++ linux-2.6.32-rc7-git3/drivers/net/usb/hso.c 2009-11-19 09:04:29.000000000 +0100
@@ -2296,6 +2296,7 @@ static void hso_serial_common_free(struc
/* unlink and free TX URB */
usb_free_urb(serial->tx_urb);
kfree(serial->tx_data);
+ kfree(serial->tx_buffer);
}

static int hso_serial_common_create(struct hso_serial *serial, int num_urbs,


2009-11-19 20:20:12

by David Miller

[permalink] [raw]
Subject: Re: [PATCH 1/3] hso: memory leak in hso_serial_common_free()

From: "Martin Schiller" <[email protected]>
Date: Thu, 19 Nov 2009 09:43:57 +0100

> This patch fixes a memory leak in the hso_serial_common_free()
> function.
> The tx_buffer of a serial device was never freed here.
>
> Signed-off-by: Martin Schiller <[email protected]>

All three of your patches have been severely corrupted by
your email client. Sequences of one or more tab characters
have been converted in a single space, etc.

> 09:04:29.000000000 +0100
> @@ -2296,6 +2296,7 @@ static void hso_serial_common_free(struc
> /* unlink and free TX URB */
> usb_free_urb(serial->tx_urb);
> kfree(serial->tx_data);
> + kfree(serial->tx_buffer);
> }
>

This makes your changes unusable.

You've already gone through two iterations trying to submit
these bug fixes. Please take some time out to verify that
your outging patches in emails can be received accurately
and applied by the receiver (send the patch to yourself
and try to apply it, for example).

Thanks.