From 6835e7427cc67c60f9f4956e4b74d996a537bf11 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Thu, 15 Aug 2002 15:46:10 +0000 Subject: [PATCH] On MAC check failure for readdir, use 'goto out' to use the common exit handling, rather than returning directly to prevent leaking of vnode reference/lock. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs --- sys/compat/svr4/svr4_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c index 6f7a65ea7288..f08159818443 100644 --- a/sys/compat/svr4/svr4_misc.c +++ b/sys/compat/svr4/svr4_misc.c @@ -316,7 +316,7 @@ again: #ifdef MAC error = mac_check_vnode_readdir(td->td_ucred, vp); if (error) - return (error); + goto out; #endif error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag,