diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-01-20 18:30:21 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-01-20 18:30:21 +0000 |
commit | 15ce3cdfea031b824661d99c56b1f5f04ca5fc98 (patch) | |
tree | f9536cd70efd27079441b019f21fda3fd59a775d /usr.bin | |
parent | 7d928998d70a1d6c125eaca35867cf89e135b53f (diff) |
Don't leak line, from Tiago Cunha.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/cmd-capture-pane.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-capture-pane.c b/usr.bin/tmux/cmd-capture-pane.c index 34b64ac1751..86e97515a5a 100644 --- a/usr.bin/tmux/cmd-capture-pane.c +++ b/usr.bin/tmux/cmd-capture-pane.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-capture-pane.c,v 1.2 2009/12/03 22:50:10 nicm Exp $ */ +/* $OpenBSD: cmd-capture-pane.c,v 1.3 2010/01/20 18:30:20 nicm Exp $ */ /* * Copyright (c) 2009 Jonathan Alvarado <radobobo@users.sourceforge.net> @@ -65,6 +65,8 @@ cmd_capture_pane_exec(struct cmd *self, struct cmd_ctx *ctx) memcpy(buf + len, line, linelen); len += linelen; buf[len++] = '\n'; + + xfree(line); } limit = options_get_number(&sess->options, "buffer-limit"); |