summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-find-window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2014-05-08 06:06:08 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2014-05-08 06:06:08 +0000
commit8a9358332b9307335b316a967e1e126df6a7e2a2 (patch)
tree230da1f7087c9ea58dccc5eaa1b088febedf8b68 /usr.bin/tmux/cmd-find-window.c
parentacdfe43737001325b07ef8795e418c7582de7fa7 (diff)
Plug a memory leak, from J Raynor.
Diffstat (limited to 'usr.bin/tmux/cmd-find-window.c')
-rw-r--r--usr.bin/tmux/cmd-find-window.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-find-window.c b/usr.bin/tmux/cmd-find-window.c
index 6ff9e4098d8..0b03f9a6940 100644
--- a/usr.bin/tmux/cmd-find-window.c
+++ b/usr.bin/tmux/cmd-find-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-find-window.c,v 1.26 2014/04/17 14:45:49 nicm Exp $ */
+/* $OpenBSD: cmd-find-window.c,v 1.27 2014/05/08 06:06:07 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -200,6 +200,8 @@ cmd_find_window_exec(struct cmd *self, struct cmd_q *cmdq)
window_choose_ready(wl->window->active, 0, cmd_find_window_callback);
out:
+ for (i = 0; i < ARRAY_LENGTH(&find_list); i++)
+ free(ARRAY_ITEM(&find_list, i).list_ctx);
ARRAY_FREE(&find_list);
return (CMD_RETURN_NORMAL);
}