From 5b4eeca7ef99173c1659fffcdb71a19f41bb6f5d Mon Sep 17 00:00:00 2001 From: Patrick Latifi Date: Mon, 29 Nov 2004 20:15:41 +0000 Subject: plug memory leaks on error ok canacar markus millert --- sys/arch/i386/isa/isa_machdep.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/arch') 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; -- cgit v1.2.3