diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2011-10-23 00:49:25 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2011-10-23 00:49:25 +0000 |
commit | e63909655cf2fa3afa1513f5c54f9fd7322d43a6 (patch) | |
tree | b27e250c544970a9e67ce05a5120239b467ecccf /cmd-load-buffer.c | |
parent | 6821ccc8824588652db3d5805cf2e2fd143e8d42 (diff) | |
download | rtmux-e63909655cf2fa3afa1513f5c54f9fd7322d43a6.tar.gz rtmux-e63909655cf2fa3afa1513f5c54f9fd7322d43a6.tar.bz2 rtmux-e63909655cf2fa3afa1513f5c54f9fd7322d43a6.zip |
Plug a memory leak and update some comments, from Tiago Cunha.
Diffstat (limited to 'cmd-load-buffer.c')
-rw-r--r-- | cmd-load-buffer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd-load-buffer.c b/cmd-load-buffer.c index 34792048..a14f699e 100644 --- a/cmd-load-buffer.c +++ b/cmd-load-buffer.c @@ -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); } |