]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Mon, 10 Feb 2014 21:11:20 +0000 (16:11 -0500)
commit c129197c99550d356cf5f69b046994dd53cd1b9d upstream.

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

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

index 12ed8209ca72aa594d1c33179db89a63c238298b..9bd51e9dc30a446a05850863a0ef953bb6c94592 100644 (file)
@@ -576,6 +576,7 @@ no_firmware:
                "%s: please contact support@connecttech.com\n",
                serial->type->description);
        kfree(result);
+       kfree(command);
        return -ENODEV;
 
 no_command_private: