fix possible double free in TextIOWrapper.__init__ (closes #22849)
3 files changed