fix variout memory leaks

This commit is contained in:
2024-10-01 13:34:58 +03:00
parent 9ab7d1edff
commit 91ea5356fc
3 changed files with 5 additions and 2 deletions

View File

@ -60,6 +60,7 @@ SDL_Surface *textures_load_surface(const char *path) {
int width, height, channels;
void *image_mem = stbi_load_from_callbacks(&callbacks, &context, &width, &height, &channels, 0);
SDL_FreeRW(handle);
if (!image_mem)
goto ERR_CANNOT_READ_IMAGE;