diff options
| author | Michał Majewicz <mmajewicz@users.noreply.github.com> | 2016-08-19 10:41:47 +0200 |
|---|---|---|
| committer | Michał Majewicz <mmajewicz@users.noreply.github.com> | 2016-08-19 11:49:59 +0200 |
| commit | 2577ef35e81f7e8064cf8dd5c23c44efe1407dc5 (patch) | |
| tree | 8e67b4ea30113f511189afc06f344916c32b9dbd /src/ext4_bcache.c | |
| parent | 7f35ecb424c1990684c2d1a922467f1dde69c952 (diff) | |
ext4: easy malloc/calloc/realloc/free substitution
Diffstat (limited to 'src/ext4_bcache.c')
| -rw-r--r-- | src/ext4_bcache.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/ext4_bcache.c b/src/ext4_bcache.c index e1e3b0c..8b96825 100644 --- a/src/ext4_bcache.c +++ b/src/ext4_bcache.c @@ -35,6 +35,7 @@ */ #include "ext4_config.h" +#include "ext4_types.h" #include "ext4_bcache.h" #include "ext4_blockdev.h" #include "ext4_debug.h" @@ -120,13 +121,13 @@ ext4_buf_alloc(struct ext4_bcache *bc, uint64_t lba) { void *data; struct ext4_buf *buf; - data = malloc(bc->itemsize); + data = ext4_malloc(bc->itemsize); if (!data) return NULL; - buf = calloc(1, sizeof(struct ext4_buf)); + buf = ext4_calloc(1, sizeof(struct ext4_buf)); if (!buf) { - free(data); + ext4_free(data); return NULL; } @@ -138,8 +139,8 @@ ext4_buf_alloc(struct ext4_bcache *bc, uint64_t lba) static void ext4_buf_free(struct ext4_buf *buf) { - free(buf->data); - free(buf); + ext4_free(buf->data); + ext4_free(buf); } static struct ext4_buf * |
