I made a complete horlicks of the last change, fix it so it doesn't either lead to a double free or free the item after the end of the array.
I made a complete horlicks of the last change, fix it so it doesn't either lead
to a double free or free the item after the end of the array.

klaxalk/tmux,klaxalk/tmux,klaxalk/tmux,klaxalk/tmux,klaxalk/tmux