From 1878a9ea016a87f79f0498a99c7795234e2405f9 Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 22 Oct 2019 23:15:41 +0200 Subject: [PATCH] Corrected possible memory leak #993 --- src/raudio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/raudio.c b/src/raudio.c index 68fa95c8a..188c05329 100644 --- a/src/raudio.c +++ b/src/raudio.c @@ -474,7 +474,11 @@ static void InitAudioBufferPool() // Close the audio buffers pool static void CloseAudioBufferPool() { - for (int i = 0; i < MAX_AUDIO_BUFFER_POOL_CHANNELS; i++) RL_FREE(audioBufferPool[i]); + for (int i = 0; i < MAX_AUDIO_BUFFER_POOL_CHANNELS; i++) + { + RL_FREE(audioBufferPool[i]->buffer); + RL_FREE(audioBufferPool[i]); + } } //----------------------------------------------------------------------------------