use calloc so that mp_cmd_free won't use uninitialized data in case of an error

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16072 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2005-07-23 16:54:45 +00:00
parent 51a7a44449
commit 9fde502c50
1 changed files with 1 additions and 1 deletions

View File

@ -577,7 +577,7 @@ mp_input_parse_cmd(char* str) {
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;