changeset 36438:63be95f0e125

demux_avs: calloc instead of malloc + memset Patch by Gianluigi Tiesi [mplayer netfarm it].
author reimar
date Fri, 06 Dec 2013 19:30:53 +0000
parents eb6cdd6b9b86
children 09aae40f17f4
files libmpdemux/demux_avs.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_avs.c	Mon Dec 02 14:43:24 2013 +0000
+++ b/libmpdemux/demux_avs.c	Fri Dec 06 19:30:53 2013 +0000
@@ -84,12 +84,10 @@
 
 static AVS_T *initAVS(const char *filename)
 {
-    AVS_T *AVS = malloc (sizeof(AVS_T));
+    AVS_T *AVS = calloc(1, sizeof(AVS_T));
     AVS_Value arg0 = avs_new_value_string(filename);
     AVS_Value args = avs_new_value_array(&arg0, 1);
 
-    memset(AVS, 0, sizeof(AVS_T));
-
 #ifdef WIN32_LOADER
     AVS->ldt_fs = Setup_LDT_Keeper();
 #endif