The branch, master has been updated
       via  cb6f36655efe8d7169517cc06ef6c4513a1d14d6 (commit)
      from  f81d72326458ec421348ab5aecc7038c1850407c (commit)

- Log -----------------------------------------------------------------
commit cb6f36655efe8d7169517cc06ef6c4513a1d14d6
Author: Nicholas Marriott <nicholas.marri...@gmail.com>
Commit: Nicholas Marriott <nicholas.marri...@gmail.com>

    evbuffer_readline returns allocated storage, don't leak it.
---
 cmd-run-shell.c |    1 +
 status.c        |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/cmd-run-shell.c b/cmd-run-shell.c
index 03cbc29..9b4c006 100644
--- a/cmd-run-shell.c
+++ b/cmd-run-shell.c
@@ -112,6 +112,7 @@ cmd_run_shell_callback(struct job *job)
        do {
                if ((line = evbuffer_readline(job->event->input)) != NULL) {
                        cmd_run_shell_print (job, line);
+                       free(line);
                        lines++;
                }
        } while (line != NULL);
diff --git a/status.c b/status.c
index 3a315f4..9166ea5 100644
--- a/status.c
+++ b/status.c
@@ -676,7 +676,7 @@ status_job_callback(struct job *job)
                        memcpy(buf, EVBUFFER_DATA(job->event->input), len);
                buf[len] = '\0';
        } else
-               buf = xstrdup(line);
+               buf = line;
 
        so->out = buf;
        server_status_client(c);


-----------------------------------------------------------------------

Summary of changes:
 cmd-run-shell.c |    1 +
 status.c        |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
tmux

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
tmux-cvs mailing list
tmux-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to