[vlc-commits] httpd: use vlc_alloc helper

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


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Nov 11 18:48:37 2017 +0100| [17d8bf44c6701f03ec63bfc0ce9ebdb3838f1807] | committer: Thomas Guillem

httpd: use vlc_alloc helper

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

 modules/lua/libs/httpd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/lua/libs/httpd.c b/modules/lua/libs/httpd.c
index f0d28e97a9..d394c85e11 100644
--- a/modules/lua/libs/httpd.c
+++ b/modules/lua/libs/httpd.c
@@ -372,7 +372,7 @@ static uint8_t *vlclua_todata( lua_State *L, int narg, int *pi_data )
 {
     size_t i_data;
     const char *psz_data = lua_tolstring( L, narg, &i_data );
-    uint8_t *p_data = (uint8_t*)malloc( i_data * sizeof(uint8_t) );
+    uint8_t *p_data = vlc_alloc( i_data, sizeof(uint8_t) );
     *pi_data = (int)i_data;
     if( !p_data )
     {



More information about the vlc-commits mailing list