diff --git a/townengine/textures/textures.c b/townengine/textures/textures.c index 6f896d5..f950227 100644 --- a/townengine/textures/textures.c +++ b/townengine/textures/textures.c @@ -297,6 +297,7 @@ void textures_cache_deinit(struct texture_cache *cache) { /* free cache hashes */ for (size_t i = 0; i < shlenu(cache->hash); ++i) { + stbi_image_free(cache->hash[i].value.data->pixels); SDL_FreeSurface(cache->hash[i].value.data); } shfree(cache->hash);