summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-12-12 16:45:46 +0100
committerDaniel Friesel <derf@finalrewind.org>2018-12-12 16:45:46 +0100
commit3afc4faf97e35849071ca9762e121a90323c6441 (patch)
tree2db3275255ad2cd8891a6c6dcb23ef0631a52852 /src
parenta309d3dfd255e29d9af88ca47329384009c6f1b3 (diff)
ubjw: Add missing free() wrappers
Diffstat (limited to 'src')
-rw-r--r--src/lib/ubjson/ubjw.c5
1 files changed, 3 insertions, 2 deletions
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;
}