diff options
author | 2013-03-22 15:55:22 +0000 | |
---|---|---|
committer | 2013-03-22 15:55:22 +0000 | |
commit | f5a9523c360910d4887afd6a4822d7e7509b26ff (patch) | |
tree | b8a567cf2e71f1e7f9321dc1ab99abb79c30c00d /usr.bin/tmux/cmd-run-shell.c | |
parent | Need to set clients in context before changing their reference count. (diff) | |
download | wireguard-openbsd-f5a9523c360910d4887afd6a4822d7e7509b26ff.tar.xz wireguard-openbsd-f5a9523c360910d4887afd6a4822d7e7509b26ff.zip |
evbuffer_readline returns allocated storage, don't leak it.
Diffstat (limited to 'usr.bin/tmux/cmd-run-shell.c')
-rw-r--r-- | usr.bin/tmux/cmd-run-shell.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-run-shell.c b/usr.bin/tmux/cmd-run-shell.c index d341258bffe..c2ea3121857 100644 --- a/usr.bin/tmux/cmd-run-shell.c +++ b/usr.bin/tmux/cmd-run-shell.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-run-shell.c,v 1.15 2013/03/22 15:49:55 nicm Exp $ */ +/* $OpenBSD: cmd-run-shell.c,v 1.16 2013/03/22 15:55:22 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org> @@ -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); |