summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-set-buffer.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2011-05-25 17:51:31 +0000
committernicm <nicm@openbsd.org>2011-05-25 17:51:31 +0000
commit03a19e29acfc01cfb7f413b37ac37a06be0079e1 (patch)
tree59bb88e0c097f8f25fb9a7ff44f1f74f80e08881 /usr.bin/tmux/cmd-set-buffer.c
parentNuke a redundant if statement, from Tiago Cunha. (diff)
downloadwireguard-openbsd-03a19e29acfc01cfb7f413b37ac37a06be0079e1.tar.xz
wireguard-openbsd-03a19e29acfc01cfb7f413b37ac37a06be0079e1.zip
Memory leak in error path, from Tiago Cunha.
Diffstat (limited to 'usr.bin/tmux/cmd-set-buffer.c')
-rw-r--r--usr.bin/tmux/cmd-set-buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-set-buffer.c b/usr.bin/tmux/cmd-set-buffer.c
index 8aff8dada35..f4e1a0c7eaa 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.8 2011/01/04 00:42:47 nicm Exp $ */
+/* $OpenBSD: cmd-set-buffer.c,v 1.9 2011/05/25 17:51:31 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -61,6 +61,7 @@ cmd_set_buffer_exec(struct cmd *self, struct cmd_ctx *ctx)
if (cause != NULL) {
ctx->error(ctx, "buffer %s", cause);
xfree(cause);
+ xfree(pdata);
return (-1);
}