diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2013-10-11 08:01:30 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2013-10-11 08:01:30 +0000 |
commit | 29b8e1d7664005f772ee080b5dfbcea8875b6eba (patch) | |
tree | bbe99b18065a337b27094961e463e6a94e18edc4 /usr.bin | |
parent | f85b05977970bcf5d1aa363ef331ad174df780de (diff) |
Don't free the pane name by accident.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/format.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index 91ee0437345..8cbe12a56d9 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.37 2013/10/10 23:31:03 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.38 2013/10/11 08:01:29 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net> @@ -357,9 +357,9 @@ format_get_command(struct window_pane *wp) cmd = get_proc_name(wp->fd, wp->tty); if (cmd == NULL || *cmd == '\0') { - cmd = wp->cmd; + cmd = xstrdup(wp->cmd); if (cmd == NULL || *cmd == '\0') - cmd = wp->shell; + cmd = xstrdup(wp->shell); } out = parse_window_name(cmd); free(cmd); |