From: Jesper Juhl Date: Sun, 23 Apr 2006 17:59:23 +0000 (+0200) Subject: [PATCH] USB: Resource leak fix for whiteheat driver X-Git-Tag: v2.6.17-rc4~137^2~11 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67ca0284f69992ad71ac12dc375f2b158d9d703d;p=linux-2.6 [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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index 557411c6e7..f806553cd9 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c @@ -508,6 +508,7 @@ no_firmware: 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: