diff options
author | nicm <nicm> | 2021-03-02 11:00:38 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-03-02 11:00:38 +0000 |
commit | 81f9a23d25237f2b0c52a2867ddd2db59cc8f368 (patch) | |
tree | 76e1fb4114c3224758012f9be71cd616c92e7146 /names.c | |
parent | c44750792a9683c5cd6f9df5a69e7417b88772d2 (diff) | |
download | rtmux-81f9a23d25237f2b0c52a2867ddd2db59cc8f368.tar.gz rtmux-81f9a23d25237f2b0c52a2867ddd2db59cc8f368.tar.bz2 rtmux-81f9a23d25237f2b0c52a2867ddd2db59cc8f368.zip |
Do not use NULL active window; also do not leak window name. GitHub
issue 2590 from Chester Liu.
Diffstat (limited to 'names.c')
-rw-r--r-- | names.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -109,6 +109,8 @@ default_window_name(struct window *w) { char *cmd, *s; + if (w->active == NULL) + return (xstrdup("")); cmd = cmd_stringify_argv(w->active->argc, w->active->argv); if (cmd != NULL && *cmd != '\0') s = parse_window_name(cmd); |