From cc85d285b5190f7533a9517d14ba427ce6a9862c Mon Sep 17 00:00:00 2001 From: Tom M Date: Sat, 7 Mar 2020 14:15:13 +0100 Subject: [PATCH] Fix a memory leak in Oboe driver (#626) --- src/drivers/fluid_oboe.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/drivers/fluid_oboe.cpp b/src/drivers/fluid_oboe.cpp index f5500e96..900d9240 100644 --- a/src/drivers/fluid_oboe.cpp +++ b/src/drivers/fluid_oboe.cpp @@ -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);