diff options
-rw-r--r-- | usr.bin/tmux/format.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index 759f1d4526d..91ee0437345 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.36 2013/10/10 12:39:24 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.37 2013/10/10 23:31:03 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net> @@ -353,7 +353,7 @@ format_expand(struct format_tree *ft, const char *fmt) char * format_get_command(struct window_pane *wp) { - char *cmd; + char *cmd, *out; cmd = get_proc_name(wp->fd, wp->tty); if (cmd == NULL || *cmd == '\0') { @@ -361,7 +361,9 @@ format_get_command(struct window_pane *wp) if (cmd == NULL || *cmd == '\0') cmd = wp->shell; } - return (parse_window_name(cmd)); + out = parse_window_name(cmd); + free(cmd); + return (out); } /* Set default format keys for a session. */ |