diff options
author | 2004-12-07 03:42:45 +0000 | |
---|---|---|
committer | 2004-12-07 03:42:45 +0000 | |
commit | 87e34c94e093cf6ea992c139998c00d7f91e752a (patch) | |
tree | 8c16a5383e674412df81049e46680e8e76caa5f8 | |
parent | Don't link to ac97 specs from individual drivers. (diff) | |
download | wireguard-openbsd-87e34c94e093cf6ea992c139998c00d7f91e752a.tar.xz wireguard-openbsd-87e34c94e093cf6ea992c139998c00d7f91e752a.zip |
* add a missing vput() if VOP_SETATTR() fails.
ok tedu pedro millert
-rw-r--r-- | sys/kern/tty_pty.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 08860465cc9..b55572b59c8 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_pty.c,v 1.25 2004/07/22 06:13:08 tedu Exp $ */ +/* $OpenBSD: tty_pty.c,v 1.26 2004/12/07 03:42:45 pat Exp $ */ /* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */ /* @@ -1196,8 +1196,10 @@ retry: cred = crget(); error = VOP_SETATTR(snd.ni_vp, &vattr, cred, p); crfree(cred); - if (error) + if (error) { + vput(snd.ni_vp); goto bad; + } } VOP_UNLOCK(snd.ni_vp, 0, p); if (snd.ni_vp->v_usecount > 1 || |