summaryrefslogtreecommitdiffstats
path: root/cmd-choose-window.c
authornicm <nicm>2009-07-17 12:12:54 (GMT)
committer nicm <nicm>2009-07-17 12:12:54 (GMT)
commit5a7facedf843d45ad80700a563daacf3dfdfcea6 (patch) (side-by-side diff)
treec64bb37b22956c3d61e0bb1279a6dcce72a3ef39 /cmd-choose-window.c
parent607f9a32d97cb7cc429142abcbc7943d72fa3774 (diff)
downloadtmux-old-5a7facedf843d45ad80700a563daacf3dfdfcea6.zip
tmux-old-5a7facedf843d45ad80700a563daacf3dfdfcea6.tar.gz
tmux-old-5a7facedf843d45ad80700a563daacf3dfdfcea6.tar.bz2
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-choose-window.c') (more/less context) (ignore whitespace changes)
-rw-r--r--cmd-choose-window.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd-choose-window.c b/cmd-choose-window.c
index abc5aff..6836ccc 100644
--- a/cmd-choose-window.c
+++ b/cmd-choose-window.c
@@ -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);
}