mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 14:27:09 +00:00
Make the caller responsible for allocating memory for the paste buffer data
(needed by the load-buffer command when dealing with big files since it'll prevent tmux from dying due to memory exhaustion). From nicm.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* $Id: window-copy.c,v 1.44 2009-01-23 20:50:58 nicm Exp $ */
|
||||
/* $Id: window-copy.c,v 1.45 2009-01-25 18:51:28 tcunha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -419,7 +419,6 @@ window_copy_copy_selection(struct window_pane *wp, struct client *c)
|
||||
/* Add the buffer to the stack. */
|
||||
limit = options_get_number(&c->session->options, "buffer-limit");
|
||||
paste_add(&c->session->buffers, buf, limit);
|
||||
xfree(buf);
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user