Skip to content

Commit

Permalink
[PATCH] USB: Resource leak fix for whiteheat driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jesper Juhl authored and Greg Kroah-Hartman committed Apr 27, 2006
1 parent 2be4d50 commit 67ca028
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/serial/whiteheat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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: 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);
kfree(result);
return -ENODEV;

no_command_private:
Expand Down

0 comments on commit 67ca028

Please sign in to comment.