mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-09 01:01:07 +00:00
Image_WritePNG: image should be freed using lodepng_free
This commit is contained in:
parent
09216eb65f
commit
673a4a7315
1 changed files with 3 additions and 2 deletions
|
@ -628,10 +628,11 @@ qboolean Image_WritePNG (const char *name, byte *data, int width, int height, in
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
lodepng_state_cleanup (&state);
|
lodepng_state_cleanup (&state);
|
||||||
free (png);
|
lodepng_free (png); /* png was allocated by lodepng */
|
||||||
free (filters);
|
free (filters);
|
||||||
if (!upsidedown)
|
if (!upsidedown) {
|
||||||
free (flipped);
|
free (flipped);
|
||||||
|
}
|
||||||
|
|
||||||
return (error == 0);
|
return (error == 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue