diff options
author | Carl Fredrik Hammar <hammy.lite@gmail.com> | 2010-06-03 22:50:32 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-08-27 01:55:56 +0200 |
commit | 8c193999f747619d650219493dcdba72a65b3f44 (patch) | |
tree | 6f9e7c675628480619273416ab5e6772ba90d768 /tmpfs | |
parent | 637003fb8c9ed52a6340d6f1445a37c2e33fdd94 (diff) |
Fix malloc size in tmpfs
* tmpfs/dir.c (diskfs_direnter_hard): Fix malloc size.
Diffstat (limited to 'tmpfs')
-rw-r--r-- | tmpfs/dir.c | 2 |
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; |