Module Name: src
Committed By: christos
Date: Sun Sep 21 15:49:21 UTC 2014
Modified Files:
src/sys/arch/atari/atari: intr.c
Log Message:
fix leak.
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/atari/atari/intr.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/atari/atari/intr.c
diff -u src/sys/arch/atari/atari/intr.c:1.23 src/sys/arch/atari/atari/intr.c:1.24
--- src/sys/arch/atari/atari/intr.c:1.23 Sun Dec 19 19:25:30 2010
+++ src/sys/arch/atari/atari/intr.c Sun Sep 21 11:49:21 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.c,v 1.23 2010/12/20 00:25:30 matt Exp $ */
+/* $NetBSD: intr.c,v 1.24 2014/09/21 15:49:21 christos Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.23 2010/12/20 00:25:30 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.24 2014/09/21 15:49:21 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -132,8 +132,10 @@ intr_establish(int vector, int type, int
*/
switch (type & (AUTO_VEC|USER_VEC)) {
case AUTO_VEC:
- if (vector < AVEC_MIN || vector > AVEC_MAX)
+ if (vector < AVEC_MIN || vector > AVEC_MAX) {
+ free(ih, M_DEVBUF);
return NULL;
+ }
vec_list = &autovec_list[vector-1];
hard_vec = &autovects[vector-1];
ih->ih_intrcnt = &intrcnt_auto[vector-1];