Switch to png_malloc and free