• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1diff a/third_party/libpng16/pngmem.c b/third_party/libpng16/pngmem.c
2--- a/third_party/libpng16/pngmem.c
3+++ b/third_party/libpng16/pngmem.c
4@@ -19,6 +19,9 @@
5
6 #include "pngpriv.h"
7
8+void*	FXMEM_DefaultAlloc(size_t byte_size);
9+void	FXMEM_DefaultFree(void* pointer);
10+
11 #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
12 /* Free a png_struct */
13 void /* PRIVATE */
14@@ -92,7 +95,7 @@
15
16       else
17 #endif
18-         return malloc((size_t)size); /* checked for truncation above */
19+         return FXMEM_DefaultAlloc(size);
20    }
21
22    else
23@@ -249,7 +252,7 @@
24       return;
25 #endif /* USER_MEM */
26
27-   free(ptr);
28+   FXMEM_DefaultFree(ptr);
29 }
30
31 #ifdef PNG_USER_MEM_SUPPORTED
32