From 15ce3cdfea031b824661d99c56b1f5f04ca5fc98 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 20 Jan 2010 18:30:21 +0000 Subject: Don't leak line, from Tiago Cunha. --- usr.bin/tmux/cmd-capture-pane.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 @@ -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"); -- cgit v1.2.3