p4raw-id: //depot/perl@3298
IoIFP(sv) != PerlIO_stdin() &&
IoIFP(sv) != PerlIO_stdout() &&
IoIFP(sv) != PerlIO_stderr())
+ {
io_close((IO*)sv);
+ }
+ if (IoDIRP((IO*)sv)) {
+ PerlDir_close(IoDIRP((IO*)sv));
+ IoDIRP((IO*)sv) = 0;
+ }
Safefree(IoTOP_NAME(sv));
Safefree(IoFMT_NAME(sv));
Safefree(IoBOTTOM_NAME(sv));