=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/format.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- src/usr.bin/tmux/format.c 2013/10/10 12:39:24 1.36 +++ src/usr.bin/tmux/format.c 2013/10/10 23:31:03 1.37 @@ -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 @@ -353,7 +353,7 @@ 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 @@ 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. */