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.
This commit is contained in:
Nicholas Marriott 2009-11-13 14:47:31 +00:00
parent 5d397462e4
commit 1415eb3dd2

View File

@ -589,7 +589,6 @@ session_group_synchronize1(struct session *target, struct session *s)
/* Then free the old winlinks list. */ /* Then free the old winlinks list. */
while (!RB_EMPTY(&old_windows)) { while (!RB_EMPTY(&old_windows)) {
wl = RB_ROOT(&old_windows); wl = RB_ROOT(&old_windows);
RB_REMOVE(winlinks, &old_windows, wl); winlink_remove(&old_windows, wl);
xfree(wl);
} }
} }