Plug a memory leak, from J Raynor.
authornicm <nicm@openbsd.org>
Thu, 8 May 2014 06:06:07 +0000 (06:06 +0000)
committernicm <nicm@openbsd.org>
Thu, 8 May 2014 06:06:07 +0000 (06:06 +0000)
usr.bin/tmux/cmd-find-window.c

index 6ff9e40..0b03f9a 100644 (file)
@@ -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);
 }