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 don't leak a vnode on error
details: https://anonhg.NetBSD.org/src/rev/df8bad8dac74
branches: trunk
changeset: 783571:df8bad8dac74
user: christos <christos%NetBSD.org@localhost>
date: Sat Dec 29 21:57:13 2012 +0000
description:
don't leak a vnode on error
diffstat:
sys/arch/x86/x86/x86_autoconf.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r 7dd25806a015 -r df8bad8dac74 sys/arch/x86/x86/x86_autoconf.c
--- a/sys/arch/x86/x86/x86_autoconf.c Sat Dec 29 21:56:04 2012 +0000
+++ b/sys/arch/x86/x86/x86_autoconf.c Sat Dec 29 21:57:13 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x86_autoconf.c,v 1.65 2012/07/29 18:05:47 mlelstv Exp $ */
+/* $NetBSD: x86_autoconf.c,v 1.66 2012/12/29 21:57:13 christos Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.65 2012/07/29 18:05:47 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.66 2012/12/29 21:57:13 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -155,6 +155,7 @@
error = vn_rdwr(UIO_READ, tv, mbr, DEV_BSIZE, 0,
UIO_SYSSPACE, 0, NOCRED, NULL, NULL);
VOP_CLOSE(tv, FREAD, NOCRED);
+ vput(tv);
if (error) {
#ifdef GEOM_DEBUG
printf("matchbiosdisks: %s: MBR read failure\n",
@@ -187,7 +188,6 @@
}
}
x86_alldisks->dl_nativedisks[n].ni_nmatches = m;
- vput(tv);
}
}
deviter_release(&di);
Home |
Main Index |
Thread Index |
Old Index