summaryrefslogtreecommitdiff
path: root/ext2fs/dir.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-05-07 22:19:52 +0000
committerMiles Bader <miles@gnu.org>1995-05-07 22:19:52 +0000
commit9f248f604b2e413bfdcd03082e4f2e2f98b63079 (patch)
treeb4c0cd15ca0cb00d9d2e185ffd6f67e9113c13dc /ext2fs/dir.c
parent1e3076d418851ec44c6a68fa50851890d8385b2f (diff)
Formerly dir.c.~12~
Diffstat (limited to 'ext2fs/dir.c')
-rw-r--r--ext2fs/dir.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext2fs/dir.c b/ext2fs/dir.c
index ed1082e7..003aed42 100644
--- a/ext2fs/dir.c
+++ b/ext2fs/dir.c
@@ -102,7 +102,7 @@ diskfs_lookup (struct node *dp, char *name, enum lookup_type type,
struct node *np = 0;
int retry_dotdot = 0;
memory_object_t memobj;
- vm_address_t buf;
+ vm_address_t buf = 0;
vm_size_t buflen;
int blockaddr;
int idx;
@@ -131,6 +131,11 @@ diskfs_lookup (struct node *dp, char *name, enum lookup_type type,
ds->mapbuf = 0;
ds->mapextent = 0;
}
+ if (buf)
+ {
+ vm_deallocate (mach_task_self (), buf, buflen);
+ buf = 0;
+ }
if (ds && (type == CREATE || type == RENAME))
ds->stat = LOOKING;
@@ -252,7 +257,7 @@ diskfs_lookup (struct node *dp, char *name, enum lookup_type type,
goto out;
}
- if ((type == CREATE || type == RENAME) && !np && ds && ds->type == LOOKING)
+ if ((type == CREATE || type == RENAME) && !np && ds && ds->stat == LOOKING)
{
/* We didn't find any room, so mark ds to extend the dir */
ds->type = CREATE;