summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-run-shell.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2016-10-09 08:06:51 +0000
committernicm <nicm@openbsd.org>2016-10-09 08:06:51 +0000
commit10c3daba99e93a4a7729d07c0d02ba230289d3e1 (patch)
treee969cefef7a7d6285a1d268af9eba885c15d014c /usr.bin/tmux/cmd-run-shell.c
parentHandle NULL window or session for user options. (diff)
downloadwireguard-openbsd-10c3daba99e93a4a7729d07c0d02ba230289d3e1.tar.xz
wireguard-openbsd-10c3daba99e93a4a7729d07c0d02ba230289d3e1.zip
Pass file/line to new command for if-shell so that errors appear
sensibly.
Diffstat (limited to 'usr.bin/tmux/cmd-run-shell.c')
-rw-r--r--usr.bin/tmux/cmd-run-shell.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-run-shell.c b/usr.bin/tmux/cmd-run-shell.c
index 31c5ee836c0..13eabdbc33a 100644
--- a/usr.bin/tmux/cmd-run-shell.c
+++ b/usr.bin/tmux/cmd-run-shell.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-run-shell.c,v 1.36 2016/02/12 12:24:52 nicm Exp $ */
+/* $OpenBSD: cmd-run-shell.c,v 1.37 2016/10/09 08:06:51 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -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;