Plug a memory leak and update some comments, from Tiago Cunha.

This commit is contained in:
Nicholas Marriott
2011-10-23 00:49:25 +00:00
parent 6821ccc882
commit e63909655c
4 changed files with 5 additions and 4 deletions

View File

@ -27,7 +27,7 @@
#include "tmux.h"
/*
* Loads a session paste buffer from a file.
* Loads a paste buffer from a file.
*/
int cmd_load_buffer_exec(struct cmd *, struct cmd_ctx *);
@ -125,6 +125,7 @@ cmd_load_buffer_exec(struct cmd *self, struct cmd_ctx *ctx)
}
if (paste_replace(&global_buffers, buffer, pdata, psize) != 0) {
ctx->error(ctx, "no buffer %d", buffer);
xfree(pdata);
return (-1);
}