summaryrefslogtreecommitdiffstats
path: root/cmd-find-window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-07-17 12:12:54 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-07-17 12:12:54 +0000
commit89543e999db80310cf10f41c1486cc666d6df460 (patch)
tree09d305c58445b7e398c15034351372e057f002ef /cmd-find-window.c
parentfc17ce015076668f033beebf84e6bce96397adcb (diff)
A similar for fix for window_choose: don't rely on the callback always being
called to free data, have a separate free callback and call it from the mode cleanup code.
Diffstat (limited to 'cmd-find-window.c')
-rw-r--r--cmd-find-window.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd-find-window.c b/cmd-find-window.c
index 2534d067..20563ae1 100644
--- a/cmd-find-window.c
+++ b/cmd-find-window.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-find-window.c,v 1.11 2009-07-14 06:43:32 nicm Exp $ */
+/* $Id: cmd-find-window.c,v 1.12 2009-07-17 12:12:54 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -140,7 +140,7 @@ cmd_find_window_exec(struct cmd *self, struct cmd_ctx *ctx)
fatalx("session not found");
window_choose_ready(
- wl->window->active, 0, cmd_find_window_callback, cdata);
+ wl->window->active, 0, cmd_find_window_callback, xfree, cdata);
out:
ARRAY_FREE(&list_idx);
@@ -161,5 +161,4 @@ cmd_find_window_callback(void *data, int idx)
server_redraw_session(s);
recalculate_sizes();
}
- xfree(cdata);
}