summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/status.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-01-26 21:36:54 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-01-26 21:36:54 +0000
commit703acad2f0621a9ab157674f3b9d3c7e922802a2 (patch)
tree8e2605b42813fcbb6882d83b8663f4f4ba113f40 /usr.bin/tmux/status.c
parentdf1941ea82c566202dc27dfd6afa549815f9b457 (diff)
Actually use the copy made when no newline is found, from martynas@.
Diffstat (limited to 'usr.bin/tmux/status.c')
-rw-r--r--usr.bin/tmux/status.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c
index c4d8008d816..c6344476c09 100644
--- a/usr.bin/tmux/status.c
+++ b/usr.bin/tmux/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.56 2009/12/14 10:47:11 nicm Exp $ */
+/* $OpenBSD: status.c,v 1.57 2010/01/26 21:36:53 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -550,10 +550,11 @@ status_job_callback(struct job *job)
xfree(job->data);
else
server_redraw_client(job->client);
- job->data = xstrdup(line);
- if (buf != NULL)
- xfree(buf);
+ if (line == NULL)
+ job->data = buf;
+ else
+ job->data = xstrdup(line);
}
/* Calculate winlink status line entry width. */