aboutsummaryrefslogtreecommitdiff
path: root/spawn.c
diff options
context:
space:
mode:
authornicm <nicm>2019-06-30 19:21:53 +0000
committernicm <nicm>2019-06-30 19:21:53 +0000
commitcf30e0f9357b7e42491645a87eeae06ffb8e8066 (patch)
tree8de07a8bf70e47a91a3e5e23bf5c1426a4c3b70c /spawn.c
parent4ff7bc3eb32e9d66312d16757fb8c083df2d87d6 (diff)
downloadrtmux-cf30e0f9357b7e42491645a87eeae06ffb8e8066.tar.gz
rtmux-cf30e0f9357b7e42491645a87eeae06ffb8e8066.tar.bz2
rtmux-cf30e0f9357b7e42491645a87eeae06ffb8e8066.zip
Do not double free window if pane fails to start.
Diffstat (limited to 'spawn.c')
-rw-r--r--spawn.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/spawn.c b/spawn.c
index bae220e1..08d0426c 100644
--- a/spawn.c
+++ b/spawn.c
@@ -172,10 +172,8 @@ spawn_window(struct spawn_context *sc, char **cause)
/* Spawn the pane. */
wp = spawn_pane(sc, cause);
if (wp == NULL) {
- if (~sc->flags & SPAWN_RESPAWN) {
- window_destroy(w);
+ if (~sc->flags & SPAWN_RESPAWN)
winlink_remove(&s->windows, sc->wl);
- }
return (NULL);
}