Skip to content

Commit

Permalink
3DS: Fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
endrift committed Mar 29, 2021
1 parent 10764f8 commit 9a55468
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/platform/3ds/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ static void _setup(struct mGUIRunner* runner) {
_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;
Expand Down Expand Up @@ -882,6 +882,7 @@ int main() {
_cleanup();
return 1;
}
outputBuffer = linearMemAlign(256 * 224 * sizeof(color_t), 0x80);

struct mGUIRunner runner = {
.params = {
Expand Down

0 comments on commit 9a55468

Please sign in to comment.