[vlc-commits] win_msg: use vlc_alloc helper

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


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

win_msg: use vlc_alloc helper

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

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

diff --git a/modules/control/win_msg.c b/modules/control/win_msg.c
index 0bf29ebead..e73465b238 100644
--- a/modules/control/win_msg.c
+++ b/modules/control/win_msg.c
@@ -74,7 +74,7 @@ static LRESULT CALLBACK WMCOPYWNDPROC(HWND hwnd, UINT uMsg,
             size_t i_data = 0;
             int i_argc = p_data->argc, i_opt, i_options;
 
-            ppsz_argv = (char **)malloc( i_argc * sizeof(char *) );
+            ppsz_argv = vlc_alloc( i_argc, sizeof(char *) );
             for( i_opt = 0; i_opt < i_argc; i_opt++ )
             {
                 ppsz_argv[i_opt] = p_data->data + i_data + sizeof(size_t);



More information about the vlc-commits mailing list