From 6806850441e4a34018edffe730e72f886af694bf Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 5 Apr 2023 05:06:08 -0700 Subject: [PATCH] Core: Fix memory leaks in mCacheSet --- src/core/cache-set.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/cache-set.c b/src/core/cache-set.c index a638c786e..04d42a233 100644 --- a/src/core/cache-set.c +++ b/src/core/cache-set.c @@ -34,12 +34,15 @@ void mCacheSetDeinit(struct mCacheSet* cache) { for (i = 0; i < mMapCacheSetSize(&cache->maps); ++i) { mMapCacheDeinit(mMapCacheSetGetPointer(&cache->maps, i)); } + mMapCacheSetDeinit(&cache->maps); for (i = 0; i < mBitmapCacheSetSize(&cache->bitmaps); ++i) { mBitmapCacheDeinit(mBitmapCacheSetGetPointer(&cache->bitmaps, i)); } + mBitmapCacheSetDeinit(&cache->bitmaps); for (i = 0; i < mTileCacheSetSize(&cache->tiles); ++i) { mTileCacheDeinit(mTileCacheSetGetPointer(&cache->tiles, i)); } + mTileCacheSetDeinit(&cache->tiles); } void mCacheSetAssignVRAM(struct mCacheSet* cache, void* vram) {