summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-choose-window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-07-17 07:05:59 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-07-17 07:05:59 +0000
commitc5fbd259c753cebcffc65bfb1587452c75e3d2dc (patch)
treeb41f0da68ee47d4639eddb7034453c261145036c /usr.bin/tmux/cmd-choose-window.c
parentfb46667d07def5942735f08e5a6c006ce794fbc0 (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 'usr.bin/tmux/cmd-choose-window.c')
-rw-r--r--usr.bin/tmux/cmd-choose-window.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-choose-window.c b/usr.bin/tmux/cmd-choose-window.c
index ed2de4d7201..7a3e7a9fece 100644
--- a/usr.bin/tmux/cmd-choose-window.c
+++ b/usr.bin/tmux/cmd-choose-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-choose-window.c,v 1.2 2009/07/13 23:11:35 nicm Exp $ */
+/* $OpenBSD: cmd-choose-window.c,v 1.3 2009/07/17 07:05:58 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -85,7 +85,7 @@ cmd_choose_window_exec(struct cmd *self, struct cmd_ctx *ctx)
fatalx("session not found");
window_choose_ready(
- wl->window->active, cur, cmd_choose_window_callback, cdata);
+ wl->window->active, cur, cmd_choose_window_callback, xfree, cdata);
return (0);
}
@@ -102,5 +102,4 @@ cmd_choose_window_callback(void *data, int idx)
server_redraw_session(s);
recalculate_sizes();
}
- xfree(cdata);
}