summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-capture-pane.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2010-01-20 18:30:20 +0000
committernicm <nicm@openbsd.org>2010-01-20 18:30:20 +0000
commit3bc087d83900bd32aee67af5b43337782a426e90 (patch)
tree7fa6480b35c7b5aed29b742304ac43032b43a766 /usr.bin/tmux/cmd-capture-pane.c
parentsync (diff)
downloadwireguard-openbsd-3bc087d83900bd32aee67af5b43337782a426e90.tar.xz
wireguard-openbsd-3bc087d83900bd32aee67af5b43337782a426e90.zip
Don't leak line, from Tiago Cunha.
Diffstat (limited to 'usr.bin/tmux/cmd-capture-pane.c')
-rw-r--r--usr.bin/tmux/cmd-capture-pane.c4
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");