Update of /cvsroot/tmux/tmux
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv19245
Modified Files:
server-fn.c
Log Message:
Sync OpenBSD patchset 808:
server_kill_window can modify the RB tree so don't use RB_FOREACH, fixes
crash seen by Dan Harnett.
Index: server-fn.c
===================================================================
RCS file: /cvsroot/tmux/tmux/server-fn.c,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -d -r1.116 -r1.117
--- server-fn.c 22 Dec 2010 15:36:44 -0000 1.116
+++ server-fn.c 25 Dec 2010 23:44:37 -0000 1.117
@@ -239,10 +239,14 @@
void
server_kill_window(struct window *w)
{
- struct session *s;
+ struct session *s, *next_s;
struct winlink *wl;
- RB_FOREACH(s, sessions, &sessions) {
+ next_s = RB_MIN(sessions, &sessions);
+ while (next_s != NULL) {
+ s = next_s;
+ next_s = RB_NEXT(sessions, &sessions, s);
+
if (session_has(s, w) == NULL)
continue;
while ((wl = winlink_find_by_window(&s->windows, w)) != NULL) {
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs