]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-148651: Fix refcount leak in _zstd decompressor options (#148657)
authorMichael Bommarito <michael.bommarito@gmail.com>
Fri, 17 Apr 2026 15:42:41 +0000 (11:42 -0400)
committerGitHub <noreply@github.com>
Fri, 17 Apr 2026 15:42:41 +0000 (08:42 -0700)
commit446edda20919447fdc8b5a43f2f2ae686df82e6a
tree57a5706aac3e62054428e41d0d2ad87320fd7923
parenta86234ea853431bd3eae014bb3eef71227aeab27
gh-148651: Fix refcount leak in _zstd decompressor options (#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.
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