[PATCH] Resource leak fix for whiteheat driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>
---

 drivers/usb/serial/whiteheat.c |    1 +
 1 files changed, 1 insertion(+)

--- linux-2.6.17-rc2-git4-orig/drivers/usb/serial/whiteheat.c	2006-03-20 06:53:29.000000000 +0100
+++ linux-2.6.17-rc2-git4/drivers/usb/serial/whiteheat.c	2006-04-23 19:52:27.000000000 +0200
@@ -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 [email protected]\n", serial->type->description);
+	kfree(result);
 	return -ENODEV;
 
 no_command_private:



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux