Commit fce0deb5 authored by Jeff Garzik's avatar Jeff Garzik Committed by Linus Torvalds

[PATCH] libata kfree fix

Fixes double-kfree that caused slab corruption.
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 10bb3972
......@@ -3743,16 +3743,13 @@ int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info,
if (legacy_mode) {
if (legacy_mode & (1 << 0))
ata_device_add(probe_ent);
else
kfree(probe_ent);
if (legacy_mode & (1 << 1))
ata_device_add(probe_ent2);
else
kfree(probe_ent2);
} else {
} else
ata_device_add(probe_ent);
}
kfree(probe_ent);
kfree(probe_ent2);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment