Module Name: src
Committed By: christos
Date: Sun Sep 21 15:47:29 UTC 2014
Modified Files:
src/sys/arch/arm/ofw: ofw_irqhandler.c
Log Message:
fix leak.
To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/ofw/ofw_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/arm/ofw/ofw_irqhandler.c
diff -u src/sys/arch/arm/ofw/ofw_irqhandler.c:1.20 src/sys/arch/arm/ofw/ofw_irqhandler.c:1.21
--- src/sys/arch/arm/ofw/ofw_irqhandler.c:1.20 Fri Jun 20 09:17:59 2014
+++ src/sys/arch/arm/ofw/ofw_irqhandler.c Sun Sep 21 11:47:29 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: ofw_irqhandler.c,v 1.20 2014/06/20 13:17:59 joerg Exp $ */
+/* $NetBSD: ofw_irqhandler.c,v 1.21 2014/09/21 15:47:29 christos Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw_irqhandler.c,v 1.20 2014/06/20 13:17:59 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_irqhandler.c,v 1.21 2014/09/21 15:47:29 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -301,8 +301,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);
}