Module Name:    src
Committed By:   christos
Date:           Sun Sep 21 15:48:29 UTC 2014

Modified Files:
        src/sys/arch/shark/isa: isa_irqhandler.c

Log Message:
fix leak


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/shark/isa/isa_irqhandler.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/shark/isa/isa_irqhandler.c
diff -u src/sys/arch/shark/isa/isa_irqhandler.c:1.26 src/sys/arch/shark/isa/isa_irqhandler.c:1.27
--- src/sys/arch/shark/isa/isa_irqhandler.c:1.26	Sat Feb 22 13:56:25 2014
+++ src/sys/arch/shark/isa/isa_irqhandler.c	Sun Sep 21 11:48:29 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: isa_irqhandler.c,v 1.26 2014/02/22 18:56:25 matt Exp $	*/
+/*	$NetBSD: isa_irqhandler.c,v 1.27 2014/09/21 15:48:29 christos Exp $	*/
 
 /*
  * Copyright 1997
@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isa_irqhandler.c,v 1.26 2014/02/22 18:56:25 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isa_irqhandler.c,v 1.27 2014/09/21 15:48:29 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -320,8 +320,10 @@ intr_claim(int irq, int level, int (*ih_
 	ih->ih_arg = ih_arg;
 	ih->ih_flags = 0;
 
-	if (irq_claim(irq, ih, group, name) != 0) 
+	if (irq_claim(irq, ih, group, name) != 0) {
+		free(ih, M_DEVBUF);
 		return(NULL);
+	}
 
 	return(ih);
 }

Reply via email to