Closed smcv closed 6 months ago
This fixes a memory leak when saving PNG and JPG files if SDL_image isn't built with save support.
This also fixes a double-free if saving with libjpeg or libpng fails and falls back to tinyjpeg or miniz.
(cherry picked from commit d2c7e09053287b091f55db11e296ff12962a2194) (cherry picked from commit cf019d527ec2dc016ea500a4c03cd75bc6f8018b) Resolves: https://github.com/libsdl-org/SDL_image/issues/428
I went ahead and directly cherry-picked the relevant change in b73cd7a
This fixes a memory leak when saving PNG and JPG files if SDL_image isn't built with save support.
This also fixes a double-free if saving with libjpeg or libpng fails and falls back to tinyjpeg or miniz.
(cherry picked from commit d2c7e09053287b091f55db11e296ff12962a2194)
(cherry picked from commit cf019d527ec2dc016ea500a4c03cd75bc6f8018b)
Resolves: https://github.com/libsdl-org/SDL_image/issues/428