summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormjg <mjg@FreeBSD.org>2014-03-21 01:30:33 +0000
committermjg <mjg@FreeBSD.org>2014-03-21 01:30:33 +0000
commit186a13d55c857038121309900dac4b7ef2d48db6 (patch)
tree9f4975daefc8cd0520c8ad4a74d7ec4d5000db59
parent220e798d63f9c03403ac667760f439be007d7e93 (diff)
downloadFreeBSD-src-186a13d55c857038121309900dac4b7ef2d48db6.zip
FreeBSD-src-186a13d55c857038121309900dac4b7ef2d48db6.tar.gz
audit: plug FILEDESC_LOCK leak in audit_canon_path.
MFC after: 3 days
-rw-r--r--sys/security/audit/audit_bsm_klib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/security/audit/audit_bsm_klib.c b/sys/security/audit/audit_bsm_klib.c
index 91f7aaa..2f5a92e 100644
--- a/sys/security/audit/audit_bsm_klib.c
+++ b/sys/security/audit/audit_bsm_klib.c
@@ -497,6 +497,7 @@ audit_canon_path(struct thread *td, int dirfd, char *path, char *cpath)
/* XXX: fgetvp() that vhold()s vnode instead of vref()ing it would be better */
error = fgetvp(td, dirfd, NULL, &cvnp);
if (error) {
+ FILEDESC_SUNLOCK(fdp);
cpath[0] = '\0';
if (rvnp != NULL)
vdrop(rvnp);
OpenPOWER on IntegriCloud