summaryrefslogtreecommitdiffstats
path: root/drivers/usb
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-25 09:36:57 -0700
commitc129197c99550d356cf5f69b046994dd53cd1b9d (patch)
treee0a00d63d64cf019d42b9e9542abef665f548fb6 /drivers/usb
parent2ee44fbeac92c36e53779a57ee84cfee1affe418 (diff)
downloadlinux-c129197c99550d356cf5f69b046994dd53cd1b9d.tar.gz
linux-c129197c99550d356cf5f69b046994dd53cd1b9d.tar.bz2
linux-c129197c99550d356cf5f69b046994dd53cd1b9d.zip
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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index 346c7efc20b0..cfd155e2b6a2 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -333,6 +333,7 @@ no_firmware:
"%s: please contact support@connecttech.com\n",
serial->type->description);
kfree(result);
+ kfree(command);
return -ENODEV;
no_command_private: