diff options
-rw-r--r-- | ext2fs/inode.c | 3 | ||||
-rw-r--r-- | ufs/inode.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/ext2fs/inode.c b/ext2fs/inode.c index 6d2d2084..730b4e60 100644 --- a/ext2fs/inode.c +++ b/ext2fs/inode.c @@ -543,8 +543,7 @@ diskfs_get_translator (struct node *np, char **namep, unsigned *namelen) datalen = ((unsigned char *)transloc)[0] + (((unsigned char *)transloc)[1] << 8); - if (datalen > *namelen) - vm_allocate (mach_task_self (), (vm_address_t *) namep, datalen, 1); + *namep = malloc (datalen); bcopy (transloc + 2, *namep, datalen); diskfs_end_catch_exception (); diff --git a/ufs/inode.c b/ufs/inode.c index 6976ef78..7f302e47 100644 --- a/ufs/inode.c +++ b/ufs/inode.c @@ -548,8 +548,7 @@ diskfs_get_translator (struct node *np, char **namep, u_int *namelen) transloc = disk_image + fsaddr (sblock, blkno); datalen = *(u_int *)transloc; - if (datalen > *namelen) - vm_allocate (mach_task_self (), (vm_address_t *) namep, datalen, 1); + *namep = malloc (datalen); bcopy (transloc + sizeof (u_int), *namep, datalen); diskfs_end_catch_exception (); |