summaryrefslogtreecommitdiffstats
path: root/cmd-find-window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-07-17 07:05:58 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-07-17 07:05:58 +0000
commit216df07688c3811983d4e3430ad59689ebaab889 (patch)
tree002fc3b0f801086f47c3f0d20d56bd8a585f13c8 /cmd-find-window.c
parent65deba3a350f760dacdb170fbecfa07edf4e4711 (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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd-find-window.c b/cmd-find-window.c
index 21461cdc..34ea75ec 100644
--- a/cmd-find-window.c
+++ b/cmd-find-window.c
@@ -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);
}