diff options
author | 2006-04-13 15:48:45 +0000 | |
---|---|---|
committer | 2006-04-13 15:48:45 +0000 | |
commit | 0169670edaaacad996800bdcf1e7c34676dea084 (patch) | |
tree | 07ae68a3625907487ecab65cd6b7b2c141ba297d | |
parent | free mem if attach fails; netbsd coverity cid 2329 (diff) | |
download | wireguard-openbsd-0169670edaaacad996800bdcf1e7c34676dea084.tar.xz wireguard-openbsd-0169670edaaacad996800bdcf1e7c34676dea084.zip |
Coverity ID 2311: in auixp_allocate_dma_chain() free dma variable if
we are unable to allocate hardware dma descriptors.
From NetBSD
ok dlg@
-rw-r--r-- | sys/dev/pci/auixp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/auixp.c b/sys/dev/pci/auixp.c index 52e34d31842..2ef6f5402ca 100644 --- a/sys/dev/pci/auixp.c +++ b/sys/dev/pci/auixp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auixp.c,v 1.4 2006/01/25 23:53:35 brad Exp $ */ +/* $OpenBSD: auixp.c,v 1.5 2006/04/13 15:48:45 brad Exp $ */ /* $NetBSD: auixp.c,v 1.9 2005/06/27 21:13:09 thorpej Exp $ */ /* @@ -792,6 +792,7 @@ auixp_allocate_dma_chain(struct auixp_softc *sc, struct auixp_dma **dmap) if (error) { printf("%s: can't malloc dma descriptor chain\n", sc->sc_dev.dv_xname); + free(dma, M_DEVBUF); return ENOMEM; } |