From: Johan Hovold Date: Thu, 25 Oct 2012 08:29:01 +0000 (+0200) Subject: USB: whiteheat: fix memory leak in error path X-Git-Tag: firefly_0821_release~3680^2~1711^2~30 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c129197c99550d356cf5f69b046994dd53cd1b9d;p=firefly-linux-kernel-4.4.55.git USB: whiteheat: fix memory leak in error path Make sure command buffer is deallocated in case of errors during attach. Cc: Cc: Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- 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: