diff options
| author | Jeff Garzik <jgarzik@redhat.com> | 2003-12-05 03:10:58 -0500 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@redhat.com> | 2003-12-05 03:10:58 -0500 |
| commit | dbdb6f6ff5b31ee4e0b6e85a6fd54ef4b5007e70 (patch) | |
| tree | 57c45e1273f1da15466514491b706eba09ef40fc | |
| parent | 5fac4115c45ec89f23f536e548a3fca334e9ac55 (diff) | |
[libata] fix use-after-free
Fixes oops some were seeing on module unload.
Caught by Jon Burgess.
| -rw-r--r-- | drivers/scsi/libata-core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 3f8bbaa5b92a..64c6d0b8e569 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -3224,8 +3224,6 @@ void ata_pci_remove_one (struct pci_dev *pdev) scsi_host_put(ap->host); /* FIXME: check return val */ } - kfree(host_set); - pci_release_regions(pdev); for (i = 0; i < host_set->n_ports; i++) { @@ -3242,6 +3240,7 @@ void ata_pci_remove_one (struct pci_dev *pdev) } } + kfree(host_set); pci_disable_device(pdev); pci_set_drvdata(pdev, NULL); } |
