drivers/block/DAC960.c: fix a use after free
PATCH 1/1 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]>
drivers/block/DAC960.c renamed from drivers/block/DAC960.c.old +1 -3
@@ -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) {