Fix #10404 vt ptys not released