Commit 67ca0284 authored by Jesper Juhl's avatar Jesper Juhl Committed by Greg Kroah-Hartman

[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: default avatarJesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2be4d502
...@@ -508,6 +508,7 @@ static int whiteheat_attach (struct usb_serial *serial) ...@@ -508,6 +508,7 @@ static int whiteheat_attach (struct usb_serial *serial)
err("%s: Unable to retrieve firmware version, try replugging\n", serial->type->description); err("%s: Unable to retrieve firmware version, try replugging\n", serial->type->description);
err("%s: If the firmware is not running (status led not blinking)\n", serial->type->description); err("%s: If the firmware is not running (status led not blinking)\n", serial->type->description);
err("%s: please contact support@connecttech.com\n", serial->type->description); err("%s: please contact support@connecttech.com\n", serial->type->description);
kfree(result);
return -ENODEV; return -ENODEV;
no_command_private: no_command_private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment