X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fext4_bcache.c;h=9d3c7fbd3364dc3a55512c76374043ba10284ad0;hb=6176f0aa46bc28e6f20626c71cceed3408684e5e;hp=e1e3b0ccbc13cb0c5ed0d790d27b5c1a5a87cadb;hpb=8281a97813ef19452be1ce6ec1a6c40e483f12f1;p=lwext4.git diff --git a/src/ext4_bcache.c b/src/ext4_bcache.c index e1e3b0c..9d3c7fb 100644 --- a/src/ext4_bcache.c +++ b/src/ext4_bcache.c @@ -34,11 +34,12 @@ * @brief Block cache allocator. */ -#include "ext4_config.h" -#include "ext4_bcache.h" -#include "ext4_blockdev.h" -#include "ext4_debug.h" -#include "ext4_errno.h" +#include +#include +#include +#include +#include +#include #include #include @@ -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 *