Magic Rotate: Free new_surf, avoid to eat too much memory.

This commit is contained in:
Pere Pujal i Carabantes 2024-09-26 23:26:11 +02:00
parent 8f11d70bce
commit 7a253f2db4

View file

@ -153,7 +153,7 @@ float do_rotate(SDL_Surface * canvas, int x, int y, int smoothing_flag)
dest.w = new_surf->w;
dest.h = new_surf->h;
SDL_BlitSurface(new_surf, NULL, canvas, &dest);
SDL_FreeSurface(new_surf);
/* Return the angle we ended up at */
return angle_rad;
}