NOTE: when realloc returns NULL, it leaves the original memory untouched */
| 80 | |
| 81 | /* NOTE: when realloc returns NULL, it leaves the original memory untouched */ |
| 82 | static void* lodepng_realloc(void* ptr, size_t new_size) { |
| 83 | #ifdef LODEPNG_MAX_ALLOC |
| 84 | if(new_size > LODEPNG_MAX_ALLOC) return 0; |
| 85 | #endif |
| 86 | return realloc(ptr, new_size); |
| 87 | } |
| 88 | |
| 89 | static void lodepng_free(void* ptr) { |
| 90 | free(ptr); |
no outgoing calls
no test coverage detected