changeset 16071:f453658297c3

use calloc so that mp_cmd_free won't use uninitialized data in case of an error
author reimar
date Sat, 23 Jul 2005 16:54:45 +0000
parents d56d00a47568
children 456246827b88
files input/input.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/input/input.c	Sat Jul 23 15:29:51 2005 +0000
+++ b/input/input.c	Sat Jul 23 16:54:45 2005 +0000
@@ -577,7 +577,7 @@
 
   cmd_def = &mp_cmds[i];
 
-  cmd = (mp_cmd_t*)malloc(sizeof(mp_cmd_t));
+  cmd = (mp_cmd_t*)calloc(1, sizeof(mp_cmd_t));
   cmd->id = cmd_def->id;
   cmd->name = strdup(cmd_def->name);
   cmd->pausing = pausing;