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 a reference leak when sort keys. #186

Merged
merged 1 commit into from
Nov 6, 2017
Merged

Conversation

serhiy-storchaka
Copy link
Contributor

PyObject_Call() returns a new reference on success. This result was leaked.

Copy link
Member

@etrepum etrepum left a comment

Choose a reason for hiding this comment

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

Good catch!

@serhiy-storchaka
Copy link
Contributor Author

I found this when tried to port one bugfix from CPython. That bug not exists in simplejson because the code is different, but surprisingly there is a leak in the exactly same place (but CPython leaked on failure, not on success).

@serhiy-storchaka serhiy-storchaka merged commit 113039a into master Nov 6, 2017
@serhiy-storchaka serhiy-storchaka deleted the sort-refleak branch November 6, 2017 21:11
This was referenced Nov 24, 2017
This was referenced Nov 24, 2017
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.

None yet

2 participants