[PATCH] USB: Resource leak fix for whiteheat driver
authorJesper Juhl <jesper.juhl@gmail.com>
Sun, 23 Apr 2006 17:59:23 +0000 (19:59 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 27 Apr 2006 17:28:57 +0000 (10:28 -0700)
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>
drivers/usb/serial/whiteheat.c

index 557411c..f806553 100644 (file)
@@ -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: