171790efcf
The pt variable's elements are used after the end of the pt scope. A move of pt to outer scope fixes this. Detected with MKSANITIZER/ASan with tmux(1), a forkpty(3) user.