summaryrefslogtreecommitdiffstats
path: root/cmd-run-shell.c
diff options
context:
space:
mode:
authornicm <nicm>2016-10-09 08:06:51 +0000
committernicm <nicm>2016-10-09 08:06:51 +0000
commit1db6d6fea6158d8d0d05e59497e40a5cfc40d068 (patch)
tree41b26060a92f19ee78172a0a1d5849e23f3715a3 /cmd-run-shell.c
parent48dd250af1ee7d097ed89ad793428a4ce139f381 (diff)
Pass file/line to new command for if-shell so that errors appear
sensibly.
Diffstat (limited to 'cmd-run-shell.c')
-rw-r--r--cmd-run-shell.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-run-shell.c b/cmd-run-shell.c
index 0bd8fc59..d87a061f 100644
--- a/cmd-run-shell.c
+++ b/cmd-run-shell.c
@@ -97,7 +97,7 @@ cmd_run_shell_exec(struct cmd *self, struct cmd_q *cmdq)
shellcmd = format_expand(ft, args->argv[0]);
format_free(ft);
- cdata = xmalloc(sizeof *cdata);
+ cdata = xcalloc(1, sizeof *cdata);
cdata->cmd = shellcmd;
cdata->bflag = args_has(args, 'b');
cdata->wp_id = wp != NULL ? (int) wp->id : -1;