aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2010-01-28 22:44:16 +0000
committerTiago Cunha <tcunha@gmx.com>2010-01-28 22:44:16 +0000
commit0e320881d50efea3e4036c4a769cf2224dcc315e (patch)
tree80e3eba845dd3107b4bde54820c4926a2e57c76f
parent1a6cb5fd54a3562e201150cdc552a0caa7c7c069 (diff)
downloadrtmux-0e320881d50efea3e4036c4a769cf2224dcc315e.tar.gz
rtmux-0e320881d50efea3e4036c4a769cf2224dcc315e.tar.bz2
rtmux-0e320881d50efea3e4036c4a769cf2224dcc315e.zip
Sync OpenBSD patchset 620:
Actually use the copy made when no newline is found, from martynas@.
-rw-r--r--status.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/status.c b/status.c
index 9242a1ed..a31e579f 100644
--- a/status.c
+++ b/status.c
@@ -1,4 +1,4 @@
-/* $Id: status.c,v 1.141 2009-12-16 01:10:36 tcunha Exp $ */
+/* $Id: status.c,v 1.142 2010-01-28 22:44:16 tcunha 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. */