diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2011-10-23 00:49:26 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2011-10-23 00:49:26 +0000 |
commit | a7df8607582762220136b4700ebdbd5cc8062ff4 (patch) | |
tree | 676730a5e9c1dcdf8012fe7e16eede2a48b75771 /usr.bin/tmux | |
parent | 1edeb94d477e30f794f6a5adb8ca00dc23d50f66 (diff) |
Plug a memory leak and update some comments, from Tiago Cunha.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/cmd-load-buffer.c | 5 | ||||
-rw-r--r-- | usr.bin/tmux/cmd-save-buffer.c | 4 | ||||
-rw-r--r-- | usr.bin/tmux/cmd-set-buffer.c | 4 | ||||
-rw-r--r-- | usr.bin/tmux/cmd-show-buffer.c | 4 |
4 files changed, 9 insertions, 8 deletions
diff --git a/usr.bin/tmux/cmd-load-buffer.c b/usr.bin/tmux/cmd-load-buffer.c index 39b05c9c632..349fb771d25 100644 --- a/usr.bin/tmux/cmd-load-buffer.c +++ b/usr.bin/tmux/cmd-load-buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-load-buffer.c,v 1.17 2011/05/18 08:07:44 nicm Exp $ */ +/* $OpenBSD: cmd-load-buffer.c,v 1.18 2011/10/23 00:49:25 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org> @@ -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); } diff --git a/usr.bin/tmux/cmd-save-buffer.c b/usr.bin/tmux/cmd-save-buffer.c index 75115250ad4..33c736a922c 100644 --- a/usr.bin/tmux/cmd-save-buffer.c +++ b/usr.bin/tmux/cmd-save-buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-save-buffer.c,v 1.10 2011/01/04 00:42:47 nicm Exp $ */ +/* $OpenBSD: cmd-save-buffer.c,v 1.11 2011/10/23 00:49:25 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org> @@ -25,7 +25,7 @@ #include "tmux.h" /* - * Saves a session paste buffer to a file. + * Saves a paste buffer to a file. */ int cmd_save_buffer_exec(struct cmd *, struct cmd_ctx *); diff --git a/usr.bin/tmux/cmd-set-buffer.c b/usr.bin/tmux/cmd-set-buffer.c index f4e1a0c7eaa..64ca74c23f5 100644 --- a/usr.bin/tmux/cmd-set-buffer.c +++ b/usr.bin/tmux/cmd-set-buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-set-buffer.c,v 1.9 2011/05/25 17:51:31 nicm Exp $ */ +/* $OpenBSD: cmd-set-buffer.c,v 1.10 2011/10/23 00:49:25 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -23,7 +23,7 @@ #include "tmux.h" /* - * Add or set a session paste buffer. + * Add or set a paste buffer. */ int cmd_set_buffer_exec(struct cmd *, struct cmd_ctx *); diff --git a/usr.bin/tmux/cmd-show-buffer.c b/usr.bin/tmux/cmd-show-buffer.c index 3dd6d6b015a..e433b0e3cf3 100644 --- a/usr.bin/tmux/cmd-show-buffer.c +++ b/usr.bin/tmux/cmd-show-buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-show-buffer.c,v 1.11 2011/04/05 19:37:01 nicm Exp $ */ +/* $OpenBSD: cmd-show-buffer.c,v 1.12 2011/10/23 00:49:25 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -23,7 +23,7 @@ #include "tmux.h" /* - * Show a session paste buffer. + * Show a paste buffer. */ int cmd_show_buffer_exec(struct cmd *, struct cmd_ctx *); |