summaryrefslogtreecommitdiffstats
path: root/session.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-11-13 14:47:31 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-11-13 14:47:31 +0000
commit1415eb3dd249e7730b151a5cfd61c47a712a522f (patch)
tree6c702d078b1223ac30af9e6578a24b1cbc0293cf /session.c
parent5d397462e45653965e1be64644a3c635eb8ef9cb (diff)
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.
Diffstat (limited to 'session.c')
-rw-r--r--session.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/session.c b/session.c
index 8d22ac77..db2eb779 100644
--- a/session.c
+++ b/session.c
@@ -589,7 +589,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);
}
}