]> git.sesse.net Git - vlc/commitdiff
GLSpectrum: fix memory leak (cid #1100858)
authorRémi Duraffort <ivoire@videolan.org>
Sun, 20 Oct 2013 06:46:59 +0000 (08:46 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Sun, 20 Oct 2013 06:46:59 +0000 (08:46 +0200)
modules/visualization/glspectrum.c

index bd41ee23d574360815e2d0596dcd9070b133084c..e7a32af5484335c5354f28f47129771a5f296a01 100644 (file)
@@ -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);
     }