diff options
author | 2019-06-30 19:21:53 +0000 | |
---|---|---|
committer | 2019-06-30 19:21:53 +0000 | |
commit | 7ecc8255d6ede9d23bf94e102e28c8b9fd032aed (patch) | |
tree | caec8ecb6c7e4a3b515cfada7bcea13e5ef1f1ab /usr.bin/tmux/spawn.c | |
parent | getifaddrs() returns -1. (diff) | |
download | wireguard-openbsd-7ecc8255d6ede9d23bf94e102e28c8b9fd032aed.tar.xz wireguard-openbsd-7ecc8255d6ede9d23bf94e102e28c8b9fd032aed.zip |
Do not double free window if pane fails to start.
Diffstat (limited to 'usr.bin/tmux/spawn.c')
-rw-r--r-- | usr.bin/tmux/spawn.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.bin/tmux/spawn.c b/usr.bin/tmux/spawn.c index 35894e9f93f..724f4835db4 100644 --- a/usr.bin/tmux/spawn.c +++ b/usr.bin/tmux/spawn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spawn.c,v 1.5 2019/05/27 12:48:52 nicm Exp $ */ +/* $OpenBSD: spawn.c,v 1.6 2019/06/30 19:21:53 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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); } |