From: Lennart Sorensen Date: Wed, 24 Oct 2012 14:23:09 +0000 (-0400) Subject: USB: serial: Fix memory leak in sierra_release() X-Git-Tag: v2.6.34.15~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa6a45bdce7042309bafd1a777033eef998f5452;p=thirdparty%2Fkernel%2Fstable.git USB: serial: Fix memory leak in sierra_release() commit f7bc5051667b74c3861f79eed98c60d5c3b883f7 upstream. I found a memory leak in sierra_release() (well sierra_probe() I guess) that looses 8 bytes each time the driver releases a device. Signed-off-by: Len Sorensen Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman Signed-off-by: Paul Gortmaker --- diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index e3f32a41ef34e..42ea133b0d576 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -980,6 +980,7 @@ static void sierra_release(struct usb_serial *serial) continue; kfree(portdata); } + kfree(serial->private); } #ifdef CONFIG_PM