diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-03-19 15:17:27 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-03-19 15:17:27 +0000 |
commit | 6b54a40376f816c07bf5262ecec28e130b304cb8 (patch) | |
tree | db4f6b32ef59c708801d7a22240149808cbd9eb5 /ext/XS | |
parent | 5d05e4606eee124eec06ad140a831c75fca95783 (diff) | |
download | perl-6b54a40376f816c07bf5262ecec28e130b304cb8.tar.gz |
PerlIO_exportFILE() and PerlIO_releaseFILE() should manage the fd
reference counts correctly.
p4raw-id: //depot/perl@30633
Diffstat (limited to 'ext/XS')
-rw-r--r-- | ext/XS/Typemap/Typemap.xs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/XS/Typemap/Typemap.xs b/ext/XS/Typemap/Typemap.xs index 3e448676f3..dbb1733856 100644 --- a/ext/XS/Typemap/Typemap.xs +++ b/ext/XS/Typemap/Typemap.xs @@ -802,10 +802,11 @@ T_STDIO_close( f ) CODE: /* Get the FILE* */ stream = PerlIO_findFILE( f ); - RETVAL = xsfclose( stream ); /* Release the FILE* from the PerlIO system so that we do not close the file twice */ PerlIO_releaseFILE(f,stream); + /* Must release the file before closing it */ + RETVAL = xsfclose( stream ); OUTPUT: RETVAL |