1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-01 22:53:50 +01:00

Delete allocated buffers before returning error if subsequent allocation fails. Patch (to feedback@) by Martin Ettl.

This commit is contained in:
RichardAsh1981@gmail.com
2014-01-18 12:28:45 +00:00
parent 1ad901dff9
commit 488d5cd3cf

View File

@@ -461,6 +461,13 @@ bool AudioUnitEffect::ProcessStereo(int count,
{
printf("Setting input render callback failed.\n");
AudioUnitUninitialize(trackUnit);
// free allocated memory
if (leftBuffer) {
delete[] leftBuffer;
}
if (rightBuffer) {
delete[] rightBuffer;
}
return false;
}
bufferList->mNumberBuffers = numChannels;