summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-04-13 15:48:46 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-04-13 15:48:46 +0000
commit4df9fec3aa1ac418d17d5ad5816be644f620e157 (patch)
tree4435d4871737998476fd4af27c35f595455c9c35
parentc218ce41024121cad83a50448391c046c1510a99 (diff)
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.c3
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;
}