~11111nonononono-deactivatedaccount-deactivatedaccount-deactivatedaccount/tmux/trunk

« back to all changes in this revision

Viewing changes to notify.c

  • Committer: tcunha
  • Date: 2012-08-31 09:22:08 UTC
  • Revision ID: svn-v4:303bd1e2-03bb-47f1-b221-2a0928954661:trunk:2864
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.

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
                if (ne->session != NULL)
125
125
                        ne->session->references--;
126
126
                if (ne->window != NULL)
127
 
                        ne->window->references--;
 
127
                        window_remove_ref(ne->window);
 
128
 
128
129
                TAILQ_REMOVE(&notify_queue, ne, entry);
129
130
                free(ne);
130
131
        }