[vlc-commits] avformat: use vlc_alloc helper

Thomas Guillem git at videolan.org
Sat Nov 11 19:00:06 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Nov 11 18:44:32 2017 +0100| [847a2c49094628a260b9422d525ea12b762a4ebd] | committer: Thomas Guillem

avformat: use vlc_alloc helper

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

 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 aa5f406fbc..5aca8a9b8b 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -1103,7 +1103,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             if( p_sys->i_attachments <= 0 )
                 return VLC_EGENERIC;
 
-            *ppp_attach = malloc( sizeof(input_attachment_t*) * p_sys->i_attachments );
+            *ppp_attach = vlc_alloc( p_sys->i_attachments, sizeof(input_attachment_t*) );
             if( *ppp_attach == NULL )
                 return VLC_EGENERIC;
 



More information about the vlc-commits mailing list