From 2b4a4b5ab6586b9cc1699b33ee05de8564d621da Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 19 Jul 2020 19:56:15 -0700 Subject: [PATCH] DS: Fix memory leak in DSReset --- src/ds/ds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ds/ds.c b/src/ds/ds.c index 1efa6a5b5..cfef72910 100644 --- a/src/ds/ds.c +++ b/src/ds/ds.c @@ -287,7 +287,7 @@ void DS7Reset(struct ARMCore* cpu) { struct DS* ds = (struct DS*) cpu->master; mTimingClear(&ds->ds7.timing); - CircleBufferInit(&ds->ds7.fifo, 64); + CircleBufferClear(&ds->ds7.fifo); DSMemoryReset(ds); DSDMAReset(&ds->ds7); DSAudioReset(&ds->audio); @@ -345,7 +345,7 @@ void DS9Reset(struct ARMCore* cpu) { struct DS* ds = (struct DS*) cpu->master; mTimingClear(&ds->ds9.timing); - CircleBufferInit(&ds->ds9.fifo, 64); + CircleBufferClear(&ds->ds9.fifo); DSVideoReset(&ds->video); DSGXReset(&ds->gx); DSDMAReset(&ds->ds9);