Skip to content

Commit 15667da

Browse files
authored
Merge pull request #24 from qlyoung/fix-uninitialized-jump
lib: Initialize ->allowrepeat
2 parents b89e46b + a8e4ddd commit 15667da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/command.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -2400,12 +2400,13 @@ cmd_init (int terminal)
24002400
struct cmd_token *
24012401
new_cmd_token (enum cmd_token_type type, u_char attr, char *text, char *desc)
24022402
{
2403-
struct cmd_token *token = XMALLOC (MTYPE_CMD_TOKENS, sizeof (struct cmd_token));
2403+
struct cmd_token *token = XCALLOC (MTYPE_CMD_TOKENS, sizeof (struct cmd_token));
24042404
token->type = type;
24052405
token->attr = attr;
24062406
token->text = text;
24072407
token->desc = desc;
24082408
token->arg = NULL;
2409+
token->allowrepeat = false;
24092410

24102411
return token;
24112412
}

0 commit comments

Comments
 (0)