mirror of
https://github.com/tmux/tmux.git
synced 2025-12-17 00:02:23 -05:00
Free command on failure, GitHub issue 4578.
This commit is contained in:
parent
05b2893b9f
commit
d90e7623c6
@ -860,8 +860,10 @@ window_tree_search(__unused void *modedata, void *itemdata, const char *ss)
|
||||
if (s == NULL || wl == NULL || wp == NULL)
|
||||
break;
|
||||
cmd = get_proc_name(wp->fd, wp->tty);
|
||||
if (cmd == NULL || *cmd == '\0')
|
||||
if (cmd == NULL || *cmd == '\0') {
|
||||
free(cmd);
|
||||
return (0);
|
||||
}
|
||||
retval = (strstr(cmd, ss) != NULL);
|
||||
free(cmd);
|
||||
return (retval);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user