]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
USB: whiteheat: fix memory leak in error path
authorJohan Hovold <jhovold@gmail.com>
Thu, 25 Oct 2012 08:29:01 +0000 (10:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Oct 2012 17:10:15 +0000 (10:10 -0700)
commit c129197c99550d356cf5f69b046994dd53cd1b9d upstream.

Make sure command buffer is deallocated in case of errors during attach.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: <support@connecttech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/whiteheat.c

index 473635e7f5dbdf8bb4c28c20102f12b438b31d77..b65ac03c437418e2cfc10713db2a5594b9a48300 100644 (file)
@@ -405,6 +405,7 @@ no_firmware:
                "%s: please contact support@connecttech.com\n",
                serial->type->description);
        kfree(result);
+       kfree(command);
        return -ENODEV;
 
 no_command_private: