=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/window-tree.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- src/usr.bin/tmux/window-tree.c 2019/04/17 14:37:48 1.36 +++ src/usr.bin/tmux/window-tree.c 2019/04/30 06:19:51 1.37 @@ -1,4 +1,4 @@ -/* $OpenBSD: window-tree.c,v 1.36 2019/04/17 14:37:48 nicm Exp $ */ +/* $OpenBSD: window-tree.c,v 1.37 2019/04/30 06:19:51 nicm Exp $ */ /* * Copyright (c) 2017 Nicholas Marriott @@ -785,7 +785,8 @@ struct session *s; struct winlink *wl; struct window_pane *wp; - const char *cmd; + char *cmd; + int retval; window_tree_pull_item(item, &s, &wl, &wp); @@ -806,7 +807,9 @@ cmd = get_proc_name(wp->fd, wp->tty); if (cmd == NULL || *cmd == '\0') return (0); - return (strstr(cmd, ss) != NULL); + retval = (strstr(cmd, ss) != NULL); + free(cmd); + return retval; } return (0); }