]> git.kernelconcepts.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Oct 2012 17:02:59 +0000 (10:02 -0700)
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>
drivers/usb/serial/sierra.c

index 449bf6d31e2adfd0801e236d95f454107ea413e6..0223ca77d2dac7c055a130c6ddefbe6735b8856b 100644 (file)
@@ -992,6 +992,7 @@ static void sierra_release(struct usb_serial *serial)
                        continue;
                kfree(portdata);
        }
+       kfree(serial->private);
 }
 
 #ifdef CONFIG_PM