summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_syscalls.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2012-06-13 21:38:07 +0000
committerpjd <pjd@FreeBSD.org>2012-06-13 21:38:07 +0000
commit0123f7ed5a0f6f662007ea2cf2fc4229b4efd08c (patch)
tree2f8d78a45216c349de8b06d7df43db11704f6779 /sys/kern/vfs_syscalls.c
parentf695b590b4c9789422bbd4036eb6bc2792dcfbac (diff)
downloadFreeBSD-src-0123f7ed5a0f6f662007ea2cf2fc4229b4efd08c.zip
FreeBSD-src-0123f7ed5a0f6f662007ea2cf2fc4229b4efd08c.tar.gz
Now that dupfdopen() doesn't depend on finstall() being called earlier,
indx will never be -1 on error, as none of dupfdopen(), finstall() and kern_capwrap() modifies it on error, but what is more important none of those functions install and leave file at indx descriptor on error. Leave an assert to prove my words. MFC after: 1 month
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r--sys/kern/vfs_syscalls.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 9d3d4eb..3c719d7 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1237,8 +1237,7 @@ success:
bad:
VFS_UNLOCK_GIANT(vfslocked);
bad_unlocked:
- if (indx != -1)
- fdclose(fdp, fp, indx, td);
+ KASSERT(indx == -1, ("indx=%d, should be -1", indx));
fdrop(fp, td);
return (error);
}
OpenPOWER on IntegriCloud