decoder/gme: use AtScopeExit()

This commit is contained in:
Max Kellermann 2016-11-22 11:48:47 +01:00
parent 085b599f84
commit 27d368d48d
1 changed files with 2 additions and 4 deletions

View File

@ -287,11 +287,9 @@ gme_scan_file(Path path_fs,
return false;
}
const bool result = ScanMusicEmu(emu, container.track, handler, handler_ctx);
AtScopeExit(emu) { gme_delete(emu); };
gme_delete(emu);
return result;
return ScanMusicEmu(emu, container.track, handler, handler_ctx);
}
static const char *const gme_suffixes[] = {