aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2012-10-25 10:29:01 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-31 09:51:35 -0700
commita48db008e3d875c6cd33f3d3aa86344e80bab16c (patch)
treeb13afd3c536ed53d206664776f56d9e1a4db06b5
parent974ee86a47395138c0def2639686d02e4a8af34c (diff)
USB: whiteheat: fix memory leak in error path
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>
-rw-r--r--drivers/usb/serial/whiteheat.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index 5b073bcc807..59d646d207b 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -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: