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