mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 14:27:09 +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:
@ -1,4 +1,4 @@
|
||||
/* $Id: cmd-choose-session.c,v 1.8 2009-07-14 06:43:32 nicm Exp $ */
|
||||
/* $Id: cmd-choose-session.c,v 1.9 2009-07-17 12:12:54 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -84,7 +84,7 @@ cmd_choose_session_exec(struct cmd *self, struct cmd_ctx *ctx)
|
||||
cdata->client = server_client_index(ctx->curclient);
|
||||
|
||||
window_choose_ready(
|
||||
wl->window->active, cur, cmd_choose_session_callback, cdata);
|
||||
wl->window->active, cur, cmd_choose_session_callback, xfree, cdata);
|
||||
|
||||
return (0);
|
||||
}
|
||||
@ -103,5 +103,4 @@ cmd_choose_session_callback(void *data, int idx)
|
||||
server_redraw_client(c);
|
||||
}
|
||||
}
|
||||
xfree(cdata);
|
||||
}
|
||||
|
Reference in New Issue
Block a user