summaryrefslogtreecommitdiff
path: root/tmpfs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'tmpfs/dir.c')
-rw-r--r--tmpfs/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tmpfs/dir.c b/tmpfs/dir.c
index 25b99bd8..2702da54 100644
--- a/tmpfs/dir.c
+++ b/tmpfs/dir.c
@@ -247,7 +247,7 @@ diskfs_direnter_hard (struct node *dp, const char *name,
> tmpfs_page_limit)
return ENOSPC;
- new = malloc (entsize);
+ new = malloc (offsetof (struct tmpfs_dirent, name) + namelen + 1);
if (new == 0)
return ENOSPC;