summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-capture-pane.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2011-08-30 09:20:17 +0000
committernicm <nicm@openbsd.org>2011-08-30 09:20:17 +0000
commitd80595968d5e3c917311b55bb2bd30042bb76087 (patch)
tree7fcdc5ef8515670a14f22dcf0658426b3bd0dc74 /usr.bin/tmux/cmd-capture-pane.c
parentPlug memory leak, from Tiago Cunha. (diff)
downloadwireguard-openbsd-d80595968d5e3c917311b55bb2bd30042bb76087.tar.xz
wireguard-openbsd-d80595968d5e3c917311b55bb2bd30042bb76087.zip
Another memory leak from Tiago Cunha.
Diffstat (limited to 'usr.bin/tmux/cmd-capture-pane.c')
-rw-r--r--usr.bin/tmux/cmd-capture-pane.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-capture-pane.c b/usr.bin/tmux/cmd-capture-pane.c
index 87e1980ff26..44c4a0f5182 100644
--- a/usr.bin/tmux/cmd-capture-pane.c
+++ b/usr.bin/tmux/cmd-capture-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-capture-pane.c,v 1.8 2011/05/08 20:37:04 nicm Exp $ */
+/* $OpenBSD: cmd-capture-pane.c,v 1.9 2011/08/30 09:20:17 nicm Exp $ */
/*
* Copyright (c) 2009 Jonathan Alvarado <radobobo@users.sourceforge.net>
@@ -109,6 +109,7 @@ cmd_capture_pane_exec(struct cmd *self, struct cmd_ctx *ctx)
buffer = args_strtonum(args, 'b', 0, INT_MAX, &cause);
if (cause != NULL) {
ctx->error(ctx, "buffer %s", cause);
+ xfree(buf);
xfree(cause);
return (-1);
}