]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
USB: serial: Fix memory leak in sierra_release()
authorLennart Sorensen <lsorense@csclub.uwaterloo.ca>
Wed, 24 Oct 2012 14:23:09 +0000 (10:23 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 30 Oct 2012 23:26:58 +0000 (23:26 +0000)
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 <lsorense@csclub.uwaterloo.ca>
Acked-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/serial/sierra.c

index 535d087b7a7b1303b1d09b2e145750d63210d90f..7041d77f49b5cf22ed430e755bba7ec2ed9848b7 100644 (file)
@@ -993,6 +993,7 @@ static void sierra_release(struct usb_serial *serial)
                        continue;
                kfree(portdata);
        }
+       kfree(serial->private);
 }
 
 #ifdef CONFIG_PM