summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-save-buffer.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2017-04-22 06:13:30 +0000
committernicm <nicm@openbsd.org>2017-04-22 06:13:30 +0000
commitfb807b18af55b8392af18e779034225682321868 (patch)
tree0c787ad68aa01424f48fc20ce4443a6cf1aaedd7 /usr.bin/tmux/cmd-save-buffer.c
parentManual page for witness(4). Adapted from FreeBSD. (diff)
downloadwireguard-openbsd-fb807b18af55b8392af18e779034225682321868.tar.xz
wireguard-openbsd-fb807b18af55b8392af18e779034225682321868.zip
Memory leaks, from David CARLIER.
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);
}