diff options
author | nicm <nicm> | 2021-08-17 11:20:13 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-08-17 11:20:13 +0000 |
commit | de9697b456c39b668ee387a17cd4abd3858e731a (patch) | |
tree | ff790bf80e77fa934dafefef2f5b2c45d06cef6f /cmd-confirm-before.c | |
parent | 41ababdf6c0529d4336a1daf3418ad314c373614 (diff) |
calloc for confirm-before data since the item needs to start NULL.
Diffstat (limited to 'cmd-confirm-before.c')
-rw-r--r-- | cmd-confirm-before.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-confirm-before.c b/cmd-confirm-before.c index 6b754370..51c2fe8e 100644 --- a/cmd-confirm-before.c +++ b/cmd-confirm-before.c @@ -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); |