calloc for confirm-before data since the item needs to start NULL.

This commit is contained in:
nicm
2021-08-17 11:20:13 +00:00
parent 41ababdf6c
commit de9697b456
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ cmd_confirm_before_exec(struct cmd *self, struct cmdq_item *item)
free(copy);
}
cdata = xmalloc(sizeof *cdata);
cdata = xcalloc(1, sizeof *cdata);
cdata->cmd = xstrdup(args->argv[0]);
cmd_get_source(self, &cdata->pi.file, &cdata->pi.line);