]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-148651: Fix refcount leak in _zstd decompressor options (GH-148657) (#148691)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 17 Apr 2026 16:07:54 +0000 (18:07 +0200)
committerGitHub <noreply@github.com>
Fri, 17 Apr 2026 16:07:54 +0000 (16:07 +0000)
commit7f6a0c377b1724c3e704ea6ed854721ea8d03620
tree5363d27818e3c66268234ab32f0626aafa1a5bfb
parent2fdccb3f88603cb72d311ca304ab7fcf9df12d00
[3.14] gh-148651: Fix refcount leak in _zstd decompressor options (GH-148657) (#148691)

gh-148651: Fix refcount leak in _zstd decompressor options (GH-148657)

The option parsing in Modules/_zstd/decompressor.c had a missing Py_DECREF(value) before the early return -1 when PyLong_AsInt(key) fails. The identical code in Modules/_zstd/compressor.c line 158 has the fix.
(cherry picked from commit 446edda20919447fdc8b5a43f2f2ae686df82e6a)

Co-authored-by: Michael Bommarito <michael.bommarito@gmail.com>
Misc/NEWS.d/next/Library/2026-04-16-13-30-00.gh-issue-148651.ZsTdLk.rst [new file with mode: 0644]
Modules/_zstd/decompressor.c