From 09f8a4777ecc63a6300dc3a432f6532e145ce9e6 Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Sun, 12 May 2013 10:21:46 +0000 Subject: [PATCH] rvoice mixer: Fix memory leak --- fluidsynth/src/rvoice/fluid_rvoice_mixer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fluidsynth/src/rvoice/fluid_rvoice_mixer.c b/fluidsynth/src/rvoice/fluid_rvoice_mixer.c index 7983a815..3133d242 100644 --- a/fluidsynth/src/rvoice/fluid_rvoice_mixer.c +++ b/fluidsynth/src/rvoice/fluid_rvoice_mixer.c @@ -619,7 +619,7 @@ fluid_mixer_buffers_free(fluid_mixer_buffers_t* buffers) void delete_fluid_rvoice_mixer(fluid_rvoice_mixer_t* mixer) { - if (!mixer) + if (!mixer) return; fluid_rvoice_mixer_set_threads(mixer, 0, 0); #ifdef ENABLE_MIXER_THREADS @@ -637,6 +637,7 @@ void delete_fluid_rvoice_mixer(fluid_rvoice_mixer_t* mixer) delete_fluid_revmodel(mixer->fx.reverb); if (mixer->fx.chorus) delete_fluid_chorus(mixer->fx.chorus); + FLUID_FREE(mixer->rvoices); FLUID_FREE(mixer); }