summaryrefslogtreecommitdiff
path: root/tmpfs
diff options
context:
space:
mode:
authorCarl Fredrik Hammar <hammy.lite@gmail.com>2010-06-03 22:50:32 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2010-08-27 01:55:56 +0200
commit8c193999f747619d650219493dcdba72a65b3f44 (patch)
tree6f9e7c675628480619273416ab5e6772ba90d768 /tmpfs
parent637003fb8c9ed52a6340d6f1445a37c2e33fdd94 (diff)
Fix malloc size in tmpfs
* tmpfs/dir.c (diskfs_direnter_hard): Fix malloc size.
Diffstat (limited to 'tmpfs')
-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;