[vlc-devel] [PATCH 11/19] android/surface: use calloc

Thomas Guillem thomas at gllm.fr
Fri Nov 14 17:10:02 CET 2014


---
 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;
-- 
2.1.1




More information about the vlc-devel mailing list