use xmalloc instead of malloc
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 @@
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 @@
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;