Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory leak in py_uwsgi_spooler_pids #2703

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

henyu6
Copy link

@henyu6 henyu6 commented Jan 30, 2025

When we call PyInt_FromLong, the reference count is increased and PyList_Append increasing the reference count again because when using PyList_Append, the reference count is incremented and not taken.

The change made is to set the result of PyInt_FromLong, append it to the list, then decrement the reference count.

@henyu6 henyu6 force-pushed the fix-leak-spooler-pids branch from ea40863 to 30470ba Compare January 30, 2025 01:13
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.

1 participant