Skip to content

gh-150042: queue.SimpleQueue.put: fix minor refleak.#150043

Merged
encukou merged 2 commits into
python:mainfrom
larryhastings:polish_simplequeue_put
May 19, 2026
Merged

gh-150042: queue.SimpleQueue.put: fix minor refleak.#150043
encukou merged 2 commits into
python:mainfrom
larryhastings:polish_simplequeue_put

Conversation

@larryhastings

@larryhastings larryhastings commented May 19, 2026

Copy link
Copy Markdown
Contributor

If queue.SimpleQueue.put can't handoff the item to a waiting thread, and fails to allocate memory when adding the item to a ringbuf, it would leak a reference. Fixed.

If queue.SimpleQueue.put can't handoff the item to a
waiting thread, and fails to allocate memory when adding
the item to a ringbuf, it would leak a reference.  Fixed.

@encukou encukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your attention to detail!

@encukou encukou merged commit 79088e0 into python:main May 19, 2026
59 checks passed
@encukou encukou added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label May 19, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @larryhastings for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@bedevere-app

bedevere-app Bot commented May 19, 2026

Copy link
Copy Markdown

GH-150127 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label May 19, 2026
encukou pushed a commit that referenced this pull request May 20, 2026
… (GH-150127)

If queue.SimpleQueue.put can't handoff the item to a
waiting thread, and fails to allocate memory when adding
the item to a ringbuf, it would leak a reference.  Fixed.
(cherry picked from commit 79088e0)

Co-authored-by: larryhastings <larry@hastings.org>
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.

2 participants