1
0
mirror of https://github.com/tmux/tmux.git synced 2025-04-27 15:48:54 +00:00

Sync OpenBSD patchset 612:

Don't leak line, from Tiago Cunha.
This commit is contained in:
Tiago Cunha 2010-01-22 17:29:19 +00:00
parent 64c26cf8ce
commit 4d477aaeef

View File

@ -1,4 +1,4 @@
/* $Id: cmd-capture-pane.c,v 1.2 2009-12-04 22:14:47 tcunha Exp $ */ /* $Id: cmd-capture-pane.c,v 1.3 2010-01-22 17:29:19 tcunha Exp $ */
/* /*
* Copyright (c) 2009 Jonathan Alvarado <radobobo@users.sourceforge.net> * 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); memcpy(buf + len, line, linelen);
len += linelen; len += linelen;
buf[len++] = '\n'; buf[len++] = '\n';
xfree(line);
} }
limit = options_get_number(&sess->options, "buffer-limit"); limit = options_get_number(&sess->options, "buffer-limit");