Module Name: src
Committed By: martin
Date: Sun Dec 8 10:27:32 UTC 2019
Modified Files:
src/sys/dev [netbsd-7-0]: cons.c
Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1717):
sys/dev/cons.c: revision 1.76
sys/dev/cons.c: revision 1.77
Fix reference count leak in cons(4).
Don't forget to vrele after you're done, folks!
Restore historical $Hdr$ tag after git cvsexportcommit nixed it.
To generate a diff of this commit:
cvs rdiff -u -r1.72.2.1 -r1.72.2.1.2.1 src/sys/dev/cons.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/dev/cons.c
diff -u src/sys/dev/cons.c:1.72.2.1 src/sys/dev/cons.c:1.72.2.1.2.1
--- src/sys/dev/cons.c:1.72.2.1 Mon Mar 9 08:00:46 2015
+++ src/sys/dev/cons.c Sun Dec 8 10:27:32 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: cons.c,v 1.72.2.1 2015/03/09 08:00:46 snj Exp $ */
+/* $NetBSD: cons.c,v 1.72.2.1.2.1 2019/12/08 10:27:32 martin Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cons.c,v 1.72.2.1 2015/03/09 08:00:46 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cons.c,v 1.72.2.1.2.1 2019/12/08 10:27:32 martin Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -150,6 +150,7 @@ cnclose(dev_t dev, int flag, int mode, s
if (error == 0) {
error = VOP_CLOSE(vp, flag, kauth_cred_get());
VOP_UNLOCK(vp);
+ vrele(vp);
}
return error;
}