diff options
author | Mike Frysinger | 2005-06-12 00:45:09 +0000 |
---|---|---|
committer | Mike Frysinger | 2005-06-12 00:45:09 +0000 |
commit | d5826903c171981d967dc6a8c430dfaaed05c53a (patch) | |
tree | e60fa099cc881ef65c0ac4115b91b0874a5d781d /e2fsprogs/ext2fs/inode.c | |
parent | 7fde8debc450c19927b82e3434fc5d6a6dd4d35d (diff) | |
download | busybox-d5826903c171981d967dc6a8c430dfaaed05c53a.zip busybox-d5826903c171981d967dc6a8c430dfaaed05c53a.tar.gz |
use xmalloc instead of malloc
Diffstat (limited to 'e2fsprogs/ext2fs/inode.c')
-rw-r--r-- | e2fsprogs/ext2fs/inode.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/e2fsprogs/ext2fs/inode.c b/e2fsprogs/ext2fs/inode.c index 222568e..30580bf 100644 --- a/e2fsprogs/ext2fs/inode.c +++ b/e2fsprogs/ext2fs/inode.c @@ -641,9 +641,7 @@ errcode_t ext2fs_write_inode_full(ext2_filsys fs, ext2_ino_t ino, length = EXT2_INODE_SIZE(fs->super); if (length > (int) sizeof(struct ext2_inode_large)) { - w_inode = malloc(length); - if (!w_inode) - return ENOMEM; + w_inode = xmalloc(length); } else w_inode = &temp_inode; memset(w_inode, 0, length); @@ -731,9 +729,7 @@ errcode_t ext2fs_write_new_inode(ext2_filsys fs, ext2_ino_t ino, return ext2fs_write_inode_full(fs, ino, inode, sizeof(struct ext2_inode)); - buf = malloc(size); - if (!buf) - return ENOMEM; + buf = xmalloc(size); memset(buf, 0, size); *buf = *inode; |