summaryrefslogtreecommitdiff
path: root/src/lib/ubjson
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ubjson')
-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;
}