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:
Tiago Cunha
2009-01-25 18:51:28 +00:00
parent 32903241a2
commit d60ad6f483
4 changed files with 15 additions and 15 deletions

View File

@ -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