Skip to content

[3.14] gh-148651: Fix refcount leak in _zstd decompressor options (GH-148657)#148691

Merged
emmatyping merged 1 commit intopython:3.14from
miss-islington:backport-446edda-3.14
Apr 17, 2026
Merged

[3.14] gh-148651: Fix refcount leak in _zstd decompressor options (GH-148657)#148691
emmatyping merged 1 commit intopython:3.14from
miss-islington:backport-446edda-3.14

Conversation

@miss-islington
Copy link
Copy Markdown
Contributor

@miss-islington miss-islington commented Apr 17, 2026

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 446edda)

Co-authored-by: Michael Bommarito michael.bommarito@gmail.com

…honGH-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 446edda)

Co-authored-by: Michael Bommarito <michael.bommarito@gmail.com>
@emmatyping emmatyping enabled auto-merge (squash) April 17, 2026 15:44
@emmatyping emmatyping merged commit 7f6a0c3 into python:3.14 Apr 17, 2026
50 checks passed
@miss-islington miss-islington deleted the backport-446edda-3.14 branch April 17, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants