]> git.sesse.net Git - vlc/commitdiff
android/surface: use calloc
authorThomas Guillem <thomas@gllm.fr>
Fri, 14 Nov 2014 16:10:02 +0000 (17:10 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 15 Nov 2014 11:25:34 +0000 (12:25 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/video_output/android/surface.c

index b0f323a2a4605706448184660d34a988b2a695e8..80d9b2c5fc59f7265ce765449e7ea65b744c36bd 100644 (file)
@@ -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;