summaryrefslogtreecommitdiff
path: root/src/ext4_mkfs.c
diff options
context:
space:
mode:
authorMichał Majewicz <mmajewicz@users.noreply.github.com>2016-08-19 10:41:47 +0200
committerMichał Majewicz <mmajewicz@users.noreply.github.com>2016-08-19 11:49:59 +0200
commit2577ef35e81f7e8064cf8dd5c23c44efe1407dc5 (patch)
tree8e67b4ea30113f511189afc06f344916c32b9dbd /src/ext4_mkfs.c
parent7f35ecb424c1990684c2d1a922467f1dde69c952 (diff)
ext4: easy malloc/calloc/realloc/free substitution
Diffstat (limited to 'src/ext4_mkfs.c')
-rw-r--r--src/ext4_mkfs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ext4_mkfs.c b/src/ext4_mkfs.c
index d6cb1ea..7af3301 100644
--- a/src/ext4_mkfs.c
+++ b/src/ext4_mkfs.c
@@ -176,11 +176,11 @@ static int create_fs_aux_info(struct fs_aux_info *aux_info,
aux_info->len_blocks -= last_group_size;
}
- aux_info->sb = calloc(1, EXT4_SUPERBLOCK_SIZE);
+ aux_info->sb = ext4_calloc(1, EXT4_SUPERBLOCK_SIZE);
if (!aux_info->sb)
return ENOMEM;
- aux_info->bg_desc_blk = calloc(1, info->block_size);
+ aux_info->bg_desc_blk = ext4_calloc(1, info->block_size);
if (!aux_info->bg_desc_blk)
return ENOMEM;
@@ -213,9 +213,9 @@ static int create_fs_aux_info(struct fs_aux_info *aux_info,
static void release_fs_aux_info(struct fs_aux_info *aux_info)
{
if (aux_info->sb)
- free(aux_info->sb);
+ ext4_free(aux_info->sb);
if (aux_info->bg_desc_blk)
- free(aux_info->bg_desc_blk);
+ ext4_free(aux_info->bg_desc_blk);
}
@@ -467,7 +467,7 @@ int ext4_mkfs_read_info(struct ext4_blockdev *bd, struct ext4_mkfs_info *info)
if (r != EOK)
return r;
- sb = malloc(EXT4_SUPERBLOCK_SIZE);
+ sb = ext4_malloc(EXT4_SUPERBLOCK_SIZE);
if (!sb)
goto Finish;
@@ -480,7 +480,7 @@ int ext4_mkfs_read_info(struct ext4_blockdev *bd, struct ext4_mkfs_info *info)
Finish:
if (sb)
- free(sb);
+ ext4_free(sb);
ext4_block_fini(bd);
return r;
}