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: v3.6.5~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09d35f2c69e5f92db3ec0b8f3ce62be0c0bbacc2;p=thirdparty%2Fkernel%2Fstable.git 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 Cc: Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index 473635e7f5dbd..b65ac03c43741 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c @@ -405,6 +405,7 @@ no_firmware: "%s: please contact support@connecttech.com\n", serial->type->description); kfree(result); + kfree(command); return -ENODEV; no_command_private: