--- a/src/printf.c Thu May 15 15:43:30 2025 +0200 +++ b/src/printf.c Thu May 15 16:02:54 2025 +0200 @@ -68,7 +68,7 @@ return (int) wfc(buf, 1, ret, stream); } else { int len = ret + 1; - char *newbuf = malloc(len); + char *newbuf = cxMalloc(cxDefaultAllocator, len); if (!newbuf) { // LCOV_EXCL_START va_end(ap2); return -1; @@ -79,7 +79,7 @@ if (ret > 0) { ret = (int) wfc(newbuf, 1, ret, stream); } - free(newbuf); + cxFree(cxDefaultAllocator, newbuf); } return ret; } @@ -121,7 +121,7 @@ if (s.ptr) { ret = vsnprintf(s.ptr, len, fmt, ap2); if (ret < 0) { - free(s.ptr); + cxFree(a, s.ptr); s.ptr = NULL; } else { s.length = (size_t) ret;