#3662: Fix segfault introduced when fixing memory leaks.

TESTED=./python -E -tt ./Lib/test/regrtest.py test_fileio
R (approach from bug)=Amaury and Benjamin
2 files changed