Sync OpenBSD patchset 1165:

Fix up window reference counting and don't crash if the rename timer
fires while the window is dead but still referenced. Fixes problem
reported by Michael Scholz.
This commit is contained in:
Tiago Cunha
2012-08-31 09:22:08 +00:00
parent 674545f7e6
commit 56e37487a8
4 changed files with 18 additions and 8 deletions

View File

@ -124,7 +124,8 @@ notify_drain(void)
if (ne->session != NULL)
ne->session->references--;
if (ne->window != NULL)
ne->window->references--;
window_remove_ref(ne->window);
TAILQ_REMOVE(&notify_queue, ne, entry);
free(ne);
}