diff options
author | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2007-03-29 07:40:11 +0000 |
---|---|---|
committer | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2007-03-29 07:40:11 +0000 |
commit | a28087e72aa53c8af44a855a18ff95f53c921549 (patch) | |
tree | 2dc28016666f5ab84fa757050d5623b258ee6a23 /sys/dev | |
parent | c23f99ea6c00d612b0f53a31db1d5309cef744bc (diff) |
Avoid leaking a ccb in error paths.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/ahci.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/pci/ahci.c b/sys/dev/pci/ahci.c index 692e4a06350..fdf049ef4c0 100644 --- a/sys/dev/pci/ahci.c +++ b/sys/dev/pci/ahci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ahci.c,v 1.104 2007/03/29 02:35:41 pascoe Exp $ */ +/* $OpenBSD: ahci.c,v 1.105 2007/03/29 07:40:10 pascoe Exp $ */ /* * Copyright (c) 2006 David Gwynne <dlg@openbsd.org> @@ -1843,6 +1843,9 @@ ahci_put_err_ccb(struct ahci_ccb *ccb) printf("ahci_port_err_ccb_restore but SACT %08x != 0?\n", sact); KASSERT(ahci_pread(ap, AHCI_PREG_CI) == 0); + /* Done with the CCB */ + ahci_put_ccb(ccb); + /* Restore outstanding command state */ ap->ap_sactive = ap->ap_err_saved_sactive; ap->ap_active_cnt = ap->ap_err_saved_active_cnt; |