blob: 7d4b491ed9edea4fd33157cf5f421cc401b3ca5d [file] [log] [blame]
diff a/third_party/libpng16/pngmem.c b/third_party/libpng16/pngmem.c
--- a/third_party/libpng16/pngmem.c
+++ b/third_party/libpng16/pngmem.c
@@ -19,6 +19,8 @@
#include "pngpriv.h"
+#include "core/fxcrt/fx_memory.h"
+
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
/* Free a png_struct */
void /* PRIVATE */
@@ -91,7 +94,7 @@
else
#endif
- return malloc((size_t)size); /* checked for truncation above */
+ return FXMEM_DefaultAlloc(size);
}
else
@@ -248,7 +251,7 @@
return;
#endif /* USER_MEM */
- free(ptr);
+ FXMEM_DefaultFree(ptr);
}
#ifdef PNG_USER_MEM_SUPPORTED