summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-11-13 14:47:32 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-11-13 14:47:32 +0000
commit32e887a25e9cf2c0addbd3c7c3df3d12302770dc (patch)
treeca33679fa2f09ae46b961b065d429af0403c435d /usr.bin
parenta1ec4055bfa5dbf61abc2a233c5d0476a7045240 (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 'usr.bin')
-rw-r--r--usr.bin/tmux/session.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/tmux/session.c b/usr.bin/tmux/session.c
index 4151c0c8f0e..d160182bce1 100644
--- a/usr.bin/tmux/session.c
+++ b/usr.bin/tmux/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.12 2009/11/03 20:29:47 nicm Exp $ */
+/* $OpenBSD: session.c,v 1.13 2009/11/13 14:47:31 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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);
}
}