summaryrefslogtreecommitdiffstats
path: root/spawn.c
diff options
context:
space:
mode:
authornicm <nicm>2021-03-02 11:00:38 +0000
committernicm <nicm>2021-03-02 11:00:38 +0000
commit81f9a23d25237f2b0c52a2867ddd2db59cc8f368 (patch)
tree76e1fb4114c3224758012f9be71cd616c92e7146 /spawn.c
parentc44750792a9683c5cd6f9df5a69e7417b88772d2 (diff)
Do not use NULL active window; also do not leak window name. GitHub
issue 2590 from Chester Liu.
Diffstat (limited to 'spawn.c')
-rw-r--r--spawn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/spawn.c b/spawn.c
index 9a801a38..e3f8debe 100644
--- a/spawn.c
+++ b/spawn.c
@@ -184,7 +184,7 @@ spawn_window(struct spawn_context *sc, char **cause)
NULL);
options_set_number(w->options, "automatic-rename", 0);
} else
- w->name = xstrdup(default_window_name(w));
+ w->name = default_window_name(w);
}
/* Switch to the new window if required. */