summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/syscall
diff options
context:
space:
mode:
authorDan McDonald <danmcd@joyent.com>2021-04-23 10:36:08 -0400
committerDan McDonald <danmcd@joyent.com>2021-04-23 10:36:08 -0400
commit3fbda93f5baf1ee1a0952503d8656a46bc846f6f (patch)
tree3302eb865143816dab81ecae1ccd964e1ca229d5 /usr/src/uts/common/syscall
parent043819558530b9580af0efc07bc0af452bcfcef5 (diff)
parent99d240ec37397536063ecdea5644c8ef759c3e9a (diff)
downloadillumos-joyent-3fbda93f5baf1ee1a0952503d8656a46bc846f6f.tar.gz
[illumos-gate merge]
commit 99d240ec37397536063ecdea5644c8ef759c3e9a 13739 vnode reference leak in copen() commit fc14a9f656c392f9e8344484089464f018de6ef6 13699 strtod(3c)/wcstod(3c) man pages should mention math.h
Diffstat (limited to 'usr/src/uts/common/syscall')
-rw-r--r--usr/src/uts/common/syscall/open.c9
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 874e31869c..94dc02b284 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;
}