]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-120754: Fix memory leak in FileIO.__init__() (#124225)
authorVictor Stinner <vstinner@python.org>
Wed, 18 Sep 2024 22:11:50 +0000 (00:11 +0200)
committerGitHub <noreply@github.com>
Wed, 18 Sep 2024 22:11:50 +0000 (00:11 +0200)
commit43cd7aa8cd88624f7211e47b98bc1e8e63e7660f
tree2281a676a2346988f7ec70f9884c322ac245212e
parentea7fe1fe2e162f2375562467ad834c6224a62daf
gh-120754: Fix memory leak in FileIO.__init__() (#124225)

Free 'self->stat_atopen' before assigning it, since
io.FileIO.__init__() can be called multiple times manually
(especially by test_io).
Modules/_io/fileio.c