summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-11-13 16:59:19 +0000
committerTiago Cunha <tcunha@gmx.com>2009-11-13 16:59:19 +0000
commit56447d73c1348c708f36a624416c008e6b262293 (patch)
treea2c002c26e886ea178d07f6fd09784b65d94f44e
parent0986001908801ebaab01e909940ff9a107562a99 (diff)
Sync OpenBSD patchset 534:
Use winlink_remove() to remove old winlinks when synchronizing grouped sessions rather than doing it manually and not adjusted the reference count. Fixes crash seen by Dan Harnett.
-rw-r--r--session.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/session.c b/session.c
index 6d78f891..5cdb1461 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
-/* $Id: session.c,v 1.70 2009-11-04 22:42:31 tcunha Exp $ */
+/* $Id: session.c,v 1.71 2009-11-13 16:59:19 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -588,7 +588,6 @@ session_group_synchronize1(struct session *target, struct session *s)
/* Then free the old winlinks list. */
while (!RB_EMPTY(&old_windows)) {
wl = RB_ROOT(&old_windows);
- RB_REMOVE(winlinks, &old_windows, wl);
- xfree(wl);
+ winlink_remove(&old_windows, wl);
}
}