summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-load-buffer.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2015-06-05 18:01:12 +0000
committernicm <nicm@openbsd.org>2015-06-05 18:01:12 +0000
commit629b6251a086286bb3aa5f2f4f529a33980d28a7 (patch)
tree2367d67d5beb673eabd4c1833f557c541208548e /usr.bin/tmux/cmd-load-buffer.c
parentDo not unconditionally clear pcb_onfault after a uvm_fault. That will (diff)
downloadwireguard-openbsd-629b6251a086286bb3aa5f2f4f529a33980d28a7.tar.xz
wireguard-openbsd-629b6251a086286bb3aa5f2f4f529a33980d28a7.zip
Instead of putting dead clients on a list and checking it every loop,
use event_once to queue a callback to deal with them. Also dead clients with references would never actually be freed because the wrap-up functions (the callback for stdin, or status_prompt_clear) would never be called. So call them in server_client_lost.
Diffstat (limited to 'usr.bin/tmux/cmd-load-buffer.c')
-rw-r--r--usr.bin/tmux/cmd-load-buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-load-buffer.c b/usr.bin/tmux/cmd-load-buffer.c
index 161c554896b..da0846cac17 100644
--- a/usr.bin/tmux/cmd-load-buffer.c
+++ b/usr.bin/tmux/cmd-load-buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-load-buffer.c,v 1.32 2015/04/27 16:25:57 nicm Exp $ */
+/* $OpenBSD: cmd-load-buffer.c,v 1.33 2015/06/05 18:01:12 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -132,7 +132,7 @@ cmd_load_buffer_callback(struct client *c, int closed, void *data)
return;
c->stdin_callback = NULL;
- c->references--;
+ server_client_deref(c);
if (c->flags & CLIENT_DEAD)
return;