From 1415eb3dd249e7730b151a5cfd61c47a712a522f Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 13 Nov 2009 14:47:31 +0000 Subject: [PATCH] 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. --- session.c | 3 +-- 1 file changed, 1 insertion(+), 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); } }