From 3afc4faf97e35849071ca9762e121a90323c6441 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 12 Dec 2018 16:45:46 +0100 Subject: ubjw: Add missing free() wrappers --- src/lib/ubjson/ubjw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib/ubjson') diff --git a/src/lib/ubjson/ubjw.c b/src/lib/ubjson/ubjw.c index c69e630..2ee78f7 100644 --- a/src/lib/ubjson/ubjw.c +++ b/src/lib/ubjson/ubjw.c @@ -5,6 +5,7 @@ #include "lib/mpmalloc.h" #else #define mpmalloc malloc +#define mpfree free #endif #define CONTAINER_IS_SIZED 0x1 @@ -84,7 +85,7 @@ struct mem_w_fd static int memclose(void* mfd) { - free(mfd); + mpfree(mfd); return 0; } static size_t memwrite(const void* data, size_t size, size_t count, struct mem_w_fd* fp) @@ -191,7 +192,7 @@ size_t ubjw_close_context(ubjw_context_t* ctx) size_t n = ctx->total_written; if (ctx->close_cb) ctx->close_cb(ctx->userdata); - free(ctx); + mpfree(ctx); return n; } -- cgit v1.2.3