Skip to content

Commit 0638e5b

Browse files
OrCat Studiosnadiaholmquist
authored andcommitted
Fix SPU output buffer leak
1 parent a4d41fa commit 0638e5b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/SPU.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,12 @@ SPU::SPU(melonDS::NDS& nds, AudioBitDepth bitdepth, AudioInterpolation interpola
226226

227227
SPU::~SPU()
228228
{
229+
if (OutputBuffer != nullptr)
230+
{
231+
free(OutputBuffer);
232+
OutputBuffer = nullptr;
233+
}
234+
229235
Platform::Mutex_Free(AudioLock);
230236
AudioLock = nullptr;
231237
blip_delete(BlipLeft);

0 commit comments

Comments
 (0)