]> git.sesse.net Git - vlc/commitdiff
* Fix a memleak in the image video output.
authorDerk-Jan Hartman <hartman@videolan.org>
Tue, 25 Oct 2005 23:19:51 +0000 (23:19 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Tue, 25 Oct 2005 23:19:51 +0000 (23:19 +0000)
  It's still not leak free. I suspect an error in src/misc/image.c

modules/video_output/image.c

index f219f2de1ac1efe80ea1e213d26d2c12c212f8e5..559ccc6ea89ebecc965a55d5dc00c68f67f7bfc8 100644 (file)
@@ -193,8 +193,14 @@ static int Init( vout_thread_t *p_vout )
  *****************************************************************************/
 static void Destroy( vlc_object_t *p_this )
 {
+    int i_index;
     vout_thread_t *p_vout = ( vout_thread_t * )p_this;
 
+    for( i_index = I_OUTPUTPICTURES-1; i_index >= 0; i_index-- )
+    {
+        free( PP_OUTPUTPICTURE[ i_index ]->p_data );
+    }
+
     /* Destroy structure */
     image_HandlerDelete( p_vout->p_sys->p_image );
     FREE( p_vout->p_sys->psz_prefix );