summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_lockf.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2009-06-10 16:17:38 +0000
committerkib <kib@FreeBSD.org>2009-06-10 16:17:38 +0000
commit4184c1892023512d4b180c5e5ef01d8661fc2064 (patch)
treeeb7eb9c4cf35bb844f834a5cf79d6385e2202847 /sys/kern/kern_lockf.c
parentda55852c4a6afecf97992606ad74162377da4422 (diff)
downloadFreeBSD-src-4184c1892023512d4b180c5e5ef01d8661fc2064.zip
FreeBSD-src-4184c1892023512d4b180c5e5ef01d8661fc2064.tar.gz
Do not leak the state->ls_lock after VI_DOOMED check introduced
in the r192683. Reported by: pho Submitted by: jhb
Diffstat (limited to 'sys/kern/kern_lockf.c')
-rw-r--r--sys/kern/kern_lockf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_lockf.c b/sys/kern/kern_lockf.c
index 8862f1e..84496cf 100644
--- a/sys/kern/kern_lockf.c
+++ b/sys/kern/kern_lockf.c
@@ -647,6 +647,7 @@ lf_advlockasync(struct vop_advlockasync_args *ap, struct lockf **statep,
VI_LOCK(vp);
if (vp->v_iflag & VI_DOOMED) {
VI_UNLOCK(vp);
+ sx_xunlock(&state->ls_lock);
lf_free_lock(lock);
return (ENOENT);
}
OpenPOWER on IntegriCloud