ThomasAdam/tmux — pull request #2 by chlunde (2012-10-10 06:19:28+00:00)
Title: Fix memory leaks and use-after-free in window-choose

Collapsing frees data so we cannot take a reference into that list
before calling collapse (could be the source of crash?)

old_list contains all items, so use that for cleanup, otherwise
some items could leak

list_copy was never freed

I could not reproduce a crash, it could depend on the platform. Please double-check this code.