mirror of https://github.com/mgba-emu/mgba.git
Core: Fix memory leak
This commit is contained in:
parent
f3c26add07
commit
7b4850024a
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue