aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/vfs_cache.c
diff options
context:
space:
mode:
authorIan Dowse <iedowse@FreeBSD.org>2001-09-04 19:03:47 +0000
committerIan Dowse <iedowse@FreeBSD.org>2001-09-04 19:03:47 +0000
commit7476f7e87de6ab6ceabe61e71968974f74476fec (patch)
treeaa162ad43a2563b319e80cae4178b6085b2d910b /sys/kern/vfs_cache.c
parent1106c5f173933f4555d9c2f359f059197a6caba8 (diff)
Notes
Diffstat (limited to 'sys/kern/vfs_cache.c')
-rw-r--r--sys/kern/vfs_cache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index ceb3c7245bcd..af3035a4cfbe 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -687,8 +687,10 @@ __getcwd(p, uap)
slash_prefixed = 0;
for (vp = fdp->fd_cdir; vp != fdp->fd_rdir && vp != rootvnode;) {
if (vp->v_flag & VROOT) {
- if (vp->v_mount == NULL) /* forced unmount */
+ if (vp->v_mount == NULL) { /* forced unmount */
+ free(buf, M_TEMP);
return (EBADF);
+ }
vp = vp->v_mount->mnt_vnodecovered;
continue;
}