diff --git a/CHANGES b/CHANGES index 3098e0854..fd9b57b26 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,7 @@ Features: - Tool for converting scanned pictures of e-Reader cards to raw dotcode data - Cheat code support in homebrew ports Other fixes: + - Core: Fix memory leak in opening games from the library - Qt: Fix infrequent deadlock when using sync to video Misc: - Qt: Rearrange menus some 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; }