aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'window.c')
-rw-r--r--window.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/window.c b/window.c
index 06733201..aeed4bc9 100644
--- a/window.c
+++ b/window.c
@@ -473,7 +473,7 @@ window_pane_spawn(struct window_pane *wp,
if (chdir(wp->cwd) != 0)
chdir("/");
for (envq = envp; *envq != NULL; envq++) {
- if (putenv((char *) *envq) != 0)
+ if (putenv(xstrdup(*envq)) != 0)
fatal("putenv failed");
}
sigreset();