[vlc-commits] GLSpectrum: fix memory leak (cid #1100858)

Rémi Duraffort git at videolan.org
Sun Oct 20 09:29:50 CEST 2013


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Oct 20 08:46:59 2013 +0200| [07af2cc79d1912b3aa048b599efa45545dbc1b14] | committer: Rémi Duraffort

GLSpectrum: fix memory leak (cid #1100858)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=07af2cc79d1912b3aa048b599efa45545dbc1b14
---

 modules/visualization/glspectrum.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/visualization/glspectrum.c b/modules/visualization/glspectrum.c
index bd41ee2..e7a32af 100644
--- a/modules/visualization/glspectrum.c
+++ b/modules/visualization/glspectrum.c
@@ -423,7 +423,7 @@ static void *Thread( void *p_data )
         const unsigned xscale[] = {0,1,2,3,4,5,6,7,8,11,15,20,27,
                                    36,47,62,82,107,141,184,255};
 
-        fft_state *p_state; /* internal FFT data */
+        fft_state *p_state = NULL; /* internal FFT data */
 
         unsigned i, j;
         float p_output[FFT_BUFFER_SIZE];           /* Raw FFT Result  */
@@ -531,6 +531,7 @@ static void *Thread( void *p_data )
         }
 
 release:
+        fft_close(p_state);
         block_Release(block);
         vlc_restorecancel(canc);
     }



More information about the vlc-commits mailing list