mirror of https://github.com/mgba-emu/mgba.git
Core: Fix memory leak when refreshing a directory
This commit is contained in:
parent
7f91cfe58d
commit
ae33504577
|
@ -243,9 +243,11 @@ void mLibraryLoadDirectory(struct mLibrary* library, const char* base, bool recu
|
|||
struct VFile* vf = dir->openFile(dir, current->filename, O_RDONLY);
|
||||
_mLibraryDeleteEntry(library, current);
|
||||
if (!vf) {
|
||||
mLibraryEntryFree(current);
|
||||
continue;
|
||||
}
|
||||
_mLibraryAddEntry(library, current->filename, base, vf);
|
||||
mLibraryEntryFree(current);
|
||||
}
|
||||
mLibraryListingDeinit(&entries);
|
||||
|
||||
|
|
Loading…
Reference in New Issue