diff options
author | 2009-07-17 07:05:58 +0000 | |
---|---|---|
committer | 2009-07-17 07:05:58 +0000 | |
commit | 97e4f00d520e35a3cf2601377ca66ac1a7435599 (patch) | |
tree | a09ab2a7a6c084080a87a0e1a383d1dba1000a61 /usr.bin/tmux/cmd-find-window.c | |
parent | Memory could be leaked if a second prompt or message appeared while another was (diff) | |
download | wireguard-openbsd-97e4f00d520e35a3cf2601377ca66ac1a7435599.tar.xz wireguard-openbsd-97e4f00d520e35a3cf2601377ca66ac1a7435599.zip |
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-find-window.c')
-rw-r--r-- | usr.bin/tmux/cmd-find-window.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-find-window.c b/usr.bin/tmux/cmd-find-window.c index 5f1047aa58f..95dac74fb56 100644 --- a/usr.bin/tmux/cmd-find-window.c +++ b/usr.bin/tmux/cmd-find-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-find-window.c,v 1.3 2009/07/13 23:11:35 nicm Exp $ */ +/* $OpenBSD: cmd-find-window.c,v 1.4 2009/07/17 07:05:58 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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); } |