summaryrefslogtreecommitdiffstats
path: root/spawn.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2020-04-23 10:01:26 +0100
committerThomas Adam <thomas@xteddy.org>2020-04-23 10:01:26 +0100
commite94a15b3d63e84a413a4975d0c1632d4761f4eec (patch)
treeb07d89274ff11d6eedd31319650434ee5e2ada7c /spawn.c
parent1a612a59361904a2996c8ca8b84e8c76548512b6 (diff)
parent906dfe9f5c217bb026929120b346722e5cb32106 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'spawn.c')
-rw-r--r--spawn.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/spawn.c b/spawn.c
index 0e7c6b3d..f1ea87d2 100644
--- a/spawn.c
+++ b/spawn.c
@@ -364,6 +364,7 @@ spawn_pane(struct spawn_context *sc, char **cause)
window_remove_pane(w, new_wp);
}
sigprocmask(SIG_SETMASK, &oldset, NULL);
+ environ_free(child);
return (NULL);
}
@@ -450,6 +451,8 @@ complete:
sigprocmask(SIG_SETMASK, &oldset, NULL);
window_pane_set_event(new_wp);
+ environ_free(child);
+
if (sc->flags & SPAWN_RESPAWN)
return (new_wp);
if ((~sc->flags & SPAWN_DETACHED) || w->active == NULL) {