diff options
author | Johan Hovold <jhovold@gmail.com> | 2012-10-25 04:29:01 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-25 12:36:57 -0400 |
commit | c129197c99550d356cf5f69b046994dd53cd1b9d (patch) | |
tree | e0a00d63d64cf019d42b9e9542abef665f548fb6 /drivers/usb | |
parent | 2ee44fbeac92c36e53779a57ee84cfee1affe418 (diff) |
USB: whiteheat: fix memory leak in error path
Make sure command buffer is deallocated in case of errors during attach.
Cc: <support@connecttech.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/serial/whiteheat.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index 346c7efc20b..cfd155e2b6a 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c | |||
@@ -333,6 +333,7 @@ no_firmware: | |||
333 | "%s: please contact support@connecttech.com\n", | 333 | "%s: please contact support@connecttech.com\n", |
334 | serial->type->description); | 334 | serial->type->description); |
335 | kfree(result); | 335 | kfree(result); |
336 | kfree(command); | ||
336 | return -ENODEV; | 337 | return -ENODEV; |
337 | 338 | ||
338 | no_command_private: | 339 | no_command_private: |