Fix a memory leak in Oboe driver (#626)

This commit is contained in:
Tom M 2020-03-07 14:15:13 +01:00 committed by GitHub
parent c9d023230a
commit cc85d285b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -208,7 +208,6 @@ void delete_fluid_oboe_audio_driver(fluid_audio_driver_t *p)
try
{
dev->cont = 0;
if(dev->stream != NULL)
@ -219,6 +218,9 @@ void delete_fluid_oboe_audio_driver(fluid_audio_driver_t *p)
}
catch(...) {}
// the audio stream is silently allocated with new, but neither the API docs nor code examples mention that it should be deleted
delete dev->stream;
delete dev->oboe_callback;
FLUID_FREE(dev);