Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] USB: Resource leak fix for whiteheat driver

We may return from drivers/usb/serial/whiteheat.c::whiteheat_attach()
without freeing `result' if we leave via the no_firmware: label.

Spotted by the coverity checker as #670

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Jesper Juhl and committed by
Greg Kroah-Hartman
67ca0284 2be4d502

+1
+1
drivers/usb/serial/whiteheat.c
··· 508 508 err("%s: Unable to retrieve firmware version, try replugging\n", serial->type->description); 509 509 err("%s: If the firmware is not running (status led not blinking)\n", serial->type->description); 510 510 err("%s: please contact support@connecttech.com\n", serial->type->description); 511 + kfree(result); 511 512 return -ENODEV; 512 513 513 514 no_command_private: