diff options
author | Patrick Latifi <pat@cvs.openbsd.org> | 2004-11-29 20:15:41 +0000 |
---|---|---|
committer | Patrick Latifi <pat@cvs.openbsd.org> | 2004-11-29 20:15:41 +0000 |
commit | 5b4eeca7ef99173c1659fffcdb71a19f41bb6f5d (patch) | |
tree | 4d525b8d63abe7eaea45a8bb80582374ce885bcc /sys/arch | |
parent | 5688e5e087054a34f5667f294d21ec5a13f6e837 (diff) |
plug memory leaks on error
ok canacar markus millert
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/isa/isa_machdep.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/i386/isa/isa_machdep.c b/sys/arch/i386/isa/isa_machdep.c index 1346d76882a..5581d4848d5 100644 --- a/sys/arch/i386/isa/isa_machdep.c +++ b/sys/arch/i386/isa/isa_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isa_machdep.c,v 1.50 2004/06/28 01:41:53 aaron Exp $ */ +/* $OpenBSD: isa_machdep.c,v 1.51 2004/11/29 20:15:40 pat Exp $ */ /* $NetBSD: isa_machdep.c,v 1.22 1997/06/12 23:57:32 thorpej Exp $ */ #define ISA_DMA_STATS @@ -575,6 +575,7 @@ isa_intr_establish(ic, irq, type, level, ih_fun, ih_arg, ih_what) if (!LEGAL_IRQ(irq) || type == IST_NONE) { printf("%s: isa_intr_establish: bogus irq or type\n", ih_what); + free(ih, M_DEVBUF); return (NULL); } switch (intrtype[irq]) { @@ -590,6 +591,7 @@ isa_intr_establish(ic, irq, type, level, ih_fun, ih_arg, ih_what) /*printf("%s: intr_establish: can't share %s with %s, irq %d\n", ih_what, isa_intr_typename(intrtype[irq]), isa_intr_typename(type), irq);*/ + free(ih, M_DEVBUF); return (NULL); } break; |