From: Johan Hovold Date: Thu, 25 Oct 2012 08:29:01 +0000 (+0200) Subject: USB: whiteheat: fix memory leak in error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c129197c99550d356cf5f69b046994dd53cd1b9d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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: