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);

2
tty.c
View File

@ -2043,7 +2043,7 @@ tty_cmd_syncstart(struct tty *tty, const struct tty_ctx *ctx)
{
if (ctx->num == 0x11) {
/*
* This is an overlay and a command that moves, the cursor so
* This is an overlay and a command that moves the cursor so
* start synchronized updates.
*/
tty_sync_start(tty);