Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 Memory leak, found by Mootja
details: https://anonhg.NetBSD.org/src/rev/3fe4921e78f2
branches: trunk
changeset: 349324:3fe4921e78f2
user: maxv <maxv%NetBSD.org@localhost>
date: Tue Dec 06 15:09:04 2016 +0000
description:
Memory leak, found by Mootja
diffstat:
sys/arch/x86/x86/intr.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r 6226254818f0 -r 3fe4921e78f2 sys/arch/x86/x86/intr.c
--- a/sys/arch/x86/x86/intr.c Tue Dec 06 15:05:07 2016 +0000
+++ b/sys/arch/x86/x86/intr.c Tue Dec 06 15:09:04 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.c,v 1.95 2016/11/16 07:13:01 knakahara Exp $ */
+/* $NetBSD: intr.c,v 1.96 2016/12/06 15:09:04 maxv Exp $ */
/*-
* Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.95 2016/11/16 07:13:01 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.96 2016/12/06 15:09:04 maxv Exp $");
#include "opt_intrdebug.h"
#include "opt_multiprocessor.h"
@@ -950,12 +950,14 @@
if (chained == NULL) {
if (msipic_is_msi_pic(pic)) {
mutex_exit(&cpu_lock);
+ kmem_free(ih, sizeof(*ih));
printf("%s: %s has no intrsource\n", __func__, intrstr);
return NULL;
}
chained = intr_allocate_io_intrsource(intrstr);
if (chained == NULL) {
mutex_exit(&cpu_lock);
+ kmem_free(ih, sizeof(*ih));
printf("%s: can't allocate io_intersource\n", __func__);
return NULL;
}
Home |
Main Index |
Thread Index |
Old Index