3DS: Fix memory leak
Vicki Pfau vi@endrift.com
Sun, 28 Mar 2021 18:26:40 -0700
1 files changed,
2 insertions(+),
1 deletions(-)
jump to
M
src/platform/3ds/main.c
→
src/platform/3ds/main.c
@@ -301,7 +301,7 @@ _map3DSKey(&runner->core->inputMap, KEY_RIGHT, GBA_KEY_RIGHT);
_map3DSKey(&runner->core->inputMap, KEY_L, GBA_KEY_L); _map3DSKey(&runner->core->inputMap, KEY_R, GBA_KEY_R); - outputBuffer = linearMemAlign(256 * 224 * sizeof(color_t), 0x80); + memset(outputBuffer, 0, 256 * 224 * sizeof(color_t)); runner->core->setVideoBuffer(runner->core, outputBuffer, 256); unsigned mode;@@ -882,6 +882,7 @@ if (!font) {
_cleanup(); return 1; } + outputBuffer = linearMemAlign(256 * 224 * sizeof(color_t), 0x80); struct mGUIRunner runner = { .params = {