ChangeSet 1.2231.1.182, 2005/03/28 20:07:01-08:00, [EMAIL PROTECTED]
[PATCH] drivers/block/DAC960.c: fix a use after free
This patch fixes a use after free found by the Coverity checker.
Controller is used in the Failure path.
In the Failure patch, Controller will be freed in the end, so this kfree
can simply be deleted.
Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
DAC960.c | 4 +---
1 files changed, 1 insertion(+), 3 deletions(-)
diff -Nru a/drivers/block/DAC960.c b/drivers/block/DAC960.c
--- a/drivers/block/DAC960.c 2005-03-28 21:46:47 -08:00
+++ b/drivers/block/DAC960.c 2005-03-28 21:46:47 -08:00
@@ -2700,10 +2700,8 @@
Controller->PCIDevice = PCI_Device;
strcpy(Controller->FullModelName, "DAC960");
- if (pci_enable_device(PCI_Device)) {
- kfree(Controller);
+ if (pci_enable_device(PCI_Device))
goto Failure;
- }
switch (Controller->HardwareType)
{
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html