diff options
author | Andy Fiddaman <omnios@citrus-it.co.uk> | 2021-04-21 13:53:47 +0000 |
---|---|---|
committer | Andy Fiddaman <omnios@citrus-it.co.uk> | 2021-04-22 18:30:38 +0000 |
commit | 99d240ec37397536063ecdea5644c8ef759c3e9a (patch) | |
tree | 5028c7e6a6c818633c0e3fbafded96e0c9d5bb43 /usr/src | |
parent | fc14a9f656c392f9e8344484089464f018de6ef6 (diff) | |
download | illumos-joyent-99d240ec37397536063ecdea5644c8ef759c3e9a.tar.gz |
13739 vnode reference leak in copen()
Reviewed by: Jason King <jason.king@joyent.com>
Reviewed by: Mike Zeller <mike.zeller@joyent.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/syscall/open.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr/src/uts/common/syscall/open.c b/usr/src/uts/common/syscall/open.c index edb04c824b..40d9717a5b 100644 --- a/usr/src/uts/common/syscall/open.c +++ b/usr/src/uts/common/syscall/open.c @@ -24,10 +24,11 @@ */ /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ +/* All Rights Reserved */ /* * Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. + * Copyright 2021 OmniOS Community Edition (OmniOSce) Association. */ /* * Portions of this source code were derived from Berkeley 4.3 BSD @@ -116,11 +117,11 @@ copen(int startfd, char *fname, int filemode, int createmode) if (filemode & FXATTRDIROPEN) { if (auditing && startvp != NULL) audit_setfsat_path(1); - if (error = lookupnameat(fname, seg, FOLLOW, - NULLVPP, &vp, startvp)) - return (set_errno(error)); + error = lookupnameat(fname, seg, FOLLOW, NULLVPP, &vp, startvp); if (startvp != NULL) VN_RELE(startvp); + if (error != 0) + return (set_errno(error)); startvp = vp; } |