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:
@@ -461,6 +461,13 @@ bool AudioUnitEffect::ProcessStereo(int count,
|
|||||||
{
|
{
|
||||||
printf("Setting input render callback failed.\n");
|
printf("Setting input render callback failed.\n");
|
||||||
AudioUnitUninitialize(trackUnit);
|
AudioUnitUninitialize(trackUnit);
|
||||||
|
// free allocated memory
|
||||||
|
if (leftBuffer) {
|
||||||
|
delete[] leftBuffer;
|
||||||
|
}
|
||||||
|
if (rightBuffer) {
|
||||||
|
delete[] rightBuffer;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bufferList->mNumberBuffers = numChannels;
|
bufferList->mNumberBuffers = numChannels;
|
||||||
|
|||||||
Reference in New Issue
Block a user