summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-save-buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/cmd-save-buffer.c')
-rw-r--r--usr.bin/tmux/cmd-save-buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-save-buffer.c b/usr.bin/tmux/cmd-save-buffer.c
index 419f1ae29f6..7072d4698ad 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.42 2017/02/14 18:13:05 nicm Exp $ */
+/* $OpenBSD: cmd-save-buffer.c,v 1.43 2017/04/22 06:13:30 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -112,6 +112,7 @@ cmd_save_buffer_exec(struct cmd *self, struct cmdq_item *item)
if (fwrite(bufdata, 1, bufsize, f) != bufsize) {
cmdq_error(item, "%s: write error", file);
fclose(f);
+ free(file);
return (CMD_RETURN_ERROR);
}