From b2c751d0b25784ddd89d41767976f858147fdc95 Mon Sep 17 00:00:00 2001 From: laurentgom Date: Thu, 12 Mar 2009 19:19:32 +0000 Subject: [PATCH] Updated stb_vorbis to fix memory leaks git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1044 4e206d99-4929-0410-ac5d-dfc041789085 --- src/SFML/Audio/stb_vorbis/stb_vorbis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SFML/Audio/stb_vorbis/stb_vorbis.c b/src/SFML/Audio/stb_vorbis/stb_vorbis.c index c092d9722..e34405f81 100755 --- a/src/SFML/Audio/stb_vorbis/stb_vorbis.c +++ b/src/SFML/Audio/stb_vorbis/stb_vorbis.c @@ -2037,7 +2037,6 @@ void dct_iv_slow(float *buffer, int n) //acc += x[j] * cos(M_PI / n * (i + 0.5) * (j + 0.5)); buffer[i] = acc; } - free(x); } void inverse_mdct_slow(float *buffer, int n, vorb *f, int blocktype) @@ -3504,8 +3503,8 @@ static int start_decoder(vorb *f) #else for (j=0; j < (int) c->lookup_values; ++j) c->multiplicands[j] = mults[j] * c->delta_value + c->minimum_value; - setup_temp_free(f, mults,sizeof(mults[0])*c->lookup_values); #endif + setup_temp_free(f, mults,sizeof(mults[0])*c->lookup_values); } skip:; @@ -3812,6 +3811,7 @@ static void vorbis_deinit(stb_vorbis *p) setup_free(p, p->B[i]); setup_free(p, p->C[i]); setup_free(p, p->window[i]); + setup_free(p, p->bit_reverse[i]); } #ifndef STB_VORBIS_NO_STDIO if (p->close_on_free) fclose(p->f);