From a14ce5c8151fcbb8d54ce839a7faca54763fe895 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Fri, 18 Jul 2014 00:52:22 -0700 Subject: [PATCH] Add some missing cleanup --- src/gba/gba-thread.c | 5 +++++ src/util/vfs-zip.c | 1 + 2 files changed, 6 insertions(+) diff --git a/src/gba/gba-thread.c b/src/gba/gba-thread.c index fe31aafc0..9354d3b60 100644 --- a/src/gba/gba-thread.c +++ b/src/gba/gba-thread.c @@ -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) { diff --git a/src/util/vfs-zip.c b/src/util/vfs-zip.c index 2446f8372..2dbdaa1bc 100644 --- a/src/util/vfs-zip.c +++ b/src/util/vfs-zip.c @@ -79,6 +79,7 @@ bool _vfzClose(struct VFile* vf) { if (zip_fclose(vfz->zf) < 0) { return false; } + free(vfz->buffer); free(vfz); return true; }