From cf30e0f9357b7e42491645a87eeae06ffb8e8066 Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 30 Jun 2019 19:21:53 +0000 Subject: Do not double free window if pane fails to start. --- spawn.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'spawn.c') 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); } -- cgit