mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 13:37:12 +00:00
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.
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user