diff --git a/CHANGES b/CHANGES index f1c377166..167d94581 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,6 @@ 0.9.2: (Future) Other fixes: + - Core: Fix memory leak in opening games from the library - Qt: Fix infrequent deadlock when using sync to video 0.9.1: (2021-04-18) diff --git a/src/core/library.c b/src/core/library.c index eeb7794de..966fa132b 100644 --- a/src/core/library.c +++ b/src/core/library.c @@ -456,6 +456,11 @@ struct VFile* mLibraryOpenVFile(struct mLibrary* library, const struct mLibraryE break; } } + for (i = 0; i < mLibraryListingSize(&entries); ++i) { + struct mLibraryEntry* e = mLibraryListingGetPointer(&entries, i); + mLibraryEntryFree(e); + } + mLibraryListingDeinit(&entries); return vf; }