[vlc-commits] dvdnav: use vlc_alloc helper

Thomas Guillem git at videolan.org
Sat Nov 11 18:59:42 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Nov 11 18:36:28 2017 +0100| [b7778e0c34c1231292b2915f2bc9718c3a4ebe7e] | committer: Thomas Guillem

dvdnav: use vlc_alloc helper

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

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

diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index f58e5e5f3e..6a4cc4f215 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -616,7 +616,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             *va_arg( args, int* ) = 1; /* Chapter offset */
 
             /* Duplicate title infos */
-            *ppp_title = malloc( p_sys->i_title * sizeof( input_title_t * ) );
+            *ppp_title = vlc_alloc( p_sys->i_title, sizeof( input_title_t * ) );
             for( i = 0; i < p_sys->i_title; i++ )
             {
                 (*ppp_title)[i] = vlc_input_title_Duplicate( p_sys->title[i] );



More information about the vlc-commits mailing list