aboutsummaryrefslogtreecommitdiffstats
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)
downloadkernel_samsung_crespo-a48db008e3d875c6cd33f3d3aa86344e80bab16c.zip
kernel_samsung_crespo-a48db008e3d875c6cd33f3d3aa86344e80bab16c.tar.gz
kernel_samsung_crespo-a48db008e3d875c6cd33f3d3aa86344e80bab16c.tar.bz2
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 5b073bc..59d646d 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: