summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/status.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-03-27 15:06:41 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-03-27 15:06:41 +0000
commit692dd06ebbe2a0a77c919848cbf0533d5e7a66ba (patch)
tree87225c042c272789464d6590f617a1664449ea2c /usr.bin/tmux/status.c
parent853cd74bbdb6e2f129e85b63bb026d788691cb70 (diff)
Don't leak job command in #().
Diffstat (limited to 'usr.bin/tmux/status.c')
-rw-r--r--usr.bin/tmux/status.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c
index ab883e52933..8ba41108f70 100644
--- a/usr.bin/tmux/status.c
+++ b/usr.bin/tmux/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.59 2010/03/22 19:18:46 nicm Exp $ */
+/* $OpenBSD: status.c,v 1.60 2010/03/27 15:06:40 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -526,6 +526,7 @@ status_job(struct client *c, char **iptr)
JOB_PERSIST, c, cmd, status_job_callback, xfree, NULL);
job_run(job);
}
+ xfree(cmd);
if (job->data == NULL)
return (xstrdup(""));
return (xstrdup(job->data));