diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-02 19:24:41 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-02 19:24:41 +0000 |
commit | 93578b34124e8a3b976cd7f68c60e871e698c9d5 (patch) | |
tree | d81e50bbb91e1181b2b03314f1303e8a622cd3db /sv.c | |
parent | 7d4fbd985f152f93fb488c6a48bdc3521292ba39 (diff) | |
download | perl-93578b34124e8a3b976cd7f68c60e871e698c9d5.tar.gz |
close directory handles properly when localized
p4raw-id: //depot/perl@3298
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -2734,7 +2734,13 @@ sv_clear(register SV *sv) 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)); |