From 46b40d8133c467028ab4c5d7670d9c248c322470 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 8 May 2014 06:06:07 +0000 Subject: [PATCH] Plug a memory leak, from J Raynor. --- usr.bin/tmux/cmd-find-window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 @@ -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); } -- 2.20.1