[New-bugs-announce] [issue10253] Fix fd leak in fileio.c and test resource warnings
Brian Brazil
report at bugs.python.org
Sat Oct 30 16:59:08 CEST 2010
New submission from Brian Brazil <brian.brazil at gmail.com>:
fileio_init will leak a fd if you open a file for append that isn't seekable. We should close this fd before returning the failure.
The attached patch fixes this and a resource warning in the tests, but I'm unsure if it'd be better to use internal_close. I'd want the error from the seek rather than any potential error from the close, so I think this is okay.
Regrtest is happy.
----------
components: IO
files: fileio_fd_leak.patch
keywords: patch
messages: 119992
nosy: bbrazil
priority: normal
severity: normal
status: open
title: Fix fd leak in fileio.c and test resource warnings
versions: Python 3.3
Added file: http://bugs.python.org/file19432/fileio_fd_leak.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10253>
_______________________________________
More information about the New-bugs-announce
mailing list