[vlc-commits] android/surface: use calloc

Thomas Guillem git at videolan.org
Sat Nov 15 12:27:22 CET 2014


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Nov 14 17:10:02 2014 +0100| [56e5dae736f4d6be3c56363efb1d4a0e36c6aa8e] | committer: Jean-Baptiste Kempf

android/surface: use calloc

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

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

 modules/video_output/android/surface.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_output/android/surface.c b/modules/video_output/android/surface.c
index b0f323a..80d9b2c 100644
--- a/modules/video_output/android/surface.c
+++ b/modules/video_output/android/surface.c
@@ -233,7 +233,7 @@ static int Open(vlc_object_t *p_this)
     sys->fmt = fmt;
 
     /* Create the associated picture */
-    picture_sys_t *picsys = malloc(sizeof(*picsys));
+    picture_sys_t *picsys = calloc(1, sizeof(picture_sys_t));
     if (unlikely(picsys == NULL))
         goto error;
     picsys->sys = sys;



More information about the vlc-commits mailing list