From c9d680aa550947cb21147b1a03b307c1920867d1 Mon Sep 17 00:00:00 2001 From: martin Date: Sun, 8 Dec 2019 10:27:32 +0000 Subject: [PATCH] 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. --- sys/dev/cons.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/cons.c b/sys/dev/cons.c index b7b1aeb44c3c..3255be9d8254 100644 --- a/sys/dev/cons.c +++ b/sys/dev/cons.c @@ -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 -__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 #include @@ -150,6 +150,7 @@ cnclose(dev_t dev, int flag, int mode, struct lwp *l) if (error == 0) { error = VOP_CLOSE(vp, flag, kauth_cred_get()); VOP_UNLOCK(vp); + vrele(vp); } return error; }