[vlc-commits] demux: ogg: fix leak on attachments

Francois Cartegnie git at videolan.org
Mon Jan 30 18:51:28 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jan 30 18:51:07 2017 +0100| [69f9689ca7f2d54535e886047918cc665f979514] | committer: Francois Cartegnie

demux: ogg: fix leak on attachments

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

 modules/demux/ogg.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index f9a8c60..9746658 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -2209,13 +2209,16 @@ static void Ogg_EndOfStream( demux_t *p_demux )
         vlc_meta_Delete( p_ogg->p_meta );
     p_ogg->p_meta = NULL;
 
+    for(int i=0; i<p_ogg->i_attachments; i++)
+        vlc_input_attachment_Delete( p_ogg->attachments[i] );
+    TAB_CLEAN(p_ogg->i_attachments, p_ogg->attachments);
+
     for ( int i=0; i < p_ogg->i_seekpoints; i++ )
     {
         if ( p_ogg->pp_seekpoints[i] )
             vlc_seekpoint_Delete( p_ogg->pp_seekpoints[i] );
     }
     TAB_CLEAN( p_ogg->i_seekpoints, p_ogg->pp_seekpoints );
-    p_ogg->i_seekpoints = 0;
 }
 
 static void Ogg_CleanSpecificData( logical_stream_t *p_stream )



More information about the vlc-commits mailing list