diff options
author | simokawa <simokawa@FreeBSD.org> | 2004-01-22 14:41:17 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 2004-01-22 14:41:17 +0000 |
commit | 9e559fd52a0ce5de58459528736b0991ca0ba181 (patch) | |
tree | 5f3ca5fc38d0cdb8124a664fd6e2ca257d0b04e6 | |
parent | 2f1199c0a6f0eef1c6720912a320afea8b27c034 (diff) | |
download | FreeBSD-src-9e559fd52a0ce5de58459528736b0991ca0ba181.zip FreeBSD-src-9e559fd52a0ce5de58459528736b0991ca0ba181.tar.gz |
Add missing free() in exception handlers.
Reported by: Stanford Metacompilation research group
-rw-r--r-- | sys/dev/firewire/fwdev.c | 4 | ||||
-rw-r--r-- | sys/dev/firewire/fwohci.c | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/firewire/fwdev.c b/sys/dev/firewire/fwdev.c index 3337080..b3ecc8a 100644 --- a/sys/dev/firewire/fwdev.c +++ b/sys/dev/firewire/fwdev.c @@ -631,8 +631,8 @@ out: /* XXX alloc buf */ xfer = fw_xfer_alloc(M_FWXFER); if(xfer == NULL){ - err = ENOMEM; - return err; + free(fwb, M_FW); + return (ENOMEM); } xfer->fc = sc->fc; diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c index 7f6b3bf..8cf9cf8 100644 --- a/sys/dev/firewire/fwohci.c +++ b/sys/dev/firewire/fwohci.c @@ -1230,6 +1230,7 @@ fwohci_db_init(struct fwohci_softc *sc, struct fwohci_dbch *dbch) DB_SIZE(dbch), dbch->ndb, BUS_DMA_WAITOK); if (dbch->am == NULL) { printf("fwohci_db_init: fwdma_malloc_multiseg failed\n"); + free(db_tr, M_FW); return; } /* Attach DB to DMA ch. */ |