Add some missing cleanup

This commit is contained in:
Jeffrey Pfau 2014-07-18 00:52:22 -07:00
parent c9ec91b75f
commit a14ce5c815
2 changed files with 6 additions and 0 deletions

View File

@ -357,6 +357,11 @@ void GBAThreadJoin(struct GBAThread* threadContext) {
threadContext->patch->close(threadContext->patch);
threadContext->patch = 0;
}
if (threadContext->gamedir) {
threadContext->gamedir->close(threadContext->gamedir);
threadContext->gamedir = 0;
}
}
void GBAThreadInterrupt(struct GBAThread* threadContext) {

View File

@ -79,6 +79,7 @@ bool _vfzClose(struct VFile* vf) {
if (zip_fclose(vfz->zf) < 0) {
return false;
}
free(vfz->buffer);
free(vfz);
return true;
}