[vlc-commits] demux/avformat: CloseDemux: properly release allocated attachments

Filip Roséen git at videolan.org
Fri May 19 14:39:24 CEST 2017


vlc | branch: master | Filip Roséen <filip at atch.se> | Fri May 19 14:35:43 2017 +0200| [8bc1f1a5eef44e2f62e2a7a9ca660eaac9e52859] | committer: Jean-Baptiste Kempf

demux/avformat: CloseDemux: properly release allocated attachments

The entries within p_sys->attachments are of course allocated with
vlc_input_attachment_New, meaning that they shall be released using
the corresponding vlc_input_attachment_Delete.

fixes: #18288

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/demux/avformat/demux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index 833a39d19b..1dd0976ee3 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -711,7 +711,7 @@ void CloseDemux( vlc_object_t *p_this )
     }
 
     for( int i = 0; i < p_sys->i_attachments; i++ )
-        free( p_sys->attachments[i] );
+        vlc_input_attachment_Delete( p_sys->attachments[i] );
     TAB_CLEAN( p_sys->i_attachments, p_sys->attachments);
 
     if( p_sys->p_title )



More information about the vlc-commits mailing list