Core: Fix memory leak

This commit is contained in:
Vicki Pfau 2022-05-27 15:52:59 -07:00
parent f3c26add07
commit 7b4850024a
1 changed files with 3 additions and 0 deletions

View File

@ -459,6 +459,9 @@ bool mCoreSaveStateNamed(struct mCore* core, struct VFile* vf, int flags) {
else { else {
bool success = _savePNGState(core, vf, &extdata); bool success = _savePNGState(core, vf, &extdata);
mStateExtdataDeinit(&extdata); mStateExtdataDeinit(&extdata);
if (cheatVf) {
cheatVf->close(cheatVf);
}
return success; return success;
} }
#endif #endif