mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-27 02:23:15 +01:00
And get it right this time... don't leak if it is an empty string either.
This commit is contained in:
parent
17ec688ced
commit
98b81e9834
9
format.c
9
format.c
@ -357,9 +357,12 @@ format_get_command(struct window_pane *wp)
|
||||
|
||||
cmd = get_proc_name(wp->fd, wp->tty);
|
||||
if (cmd == NULL || *cmd == '\0') {
|
||||
cmd = wp->cmd;
|
||||
if (cmd == NULL || *cmd == '\0')
|
||||
cmd = wp->shell;
|
||||
free(cmd);
|
||||
cmd = xstrdup(wp->cmd);
|
||||
if (cmd == NULL || *cmd == '\0') {
|
||||
free(cmd);
|
||||
cmd = xstrdup(wp->shell);
|
||||
}
|
||||
}
|
||||
out = parse_window_name(cmd);
|
||||
free(cmd);
|
||||
|
Loading…
Reference in New Issue
Block a user