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

gh-83004: Clean up refleaks in _decimal initialisation #99043

Closed
wants to merge 5 commits into from

Conversation

hauntsaninja
Copy link
Contributor

@hauntsaninja hauntsaninja commented Nov 3, 2022

@hauntsaninja hauntsaninja marked this pull request as draft November 3, 2022 06:44
CHECK_INT(PyModule_AddObject(m, "ExtendedContext",
extended_context_template));
CHECK_INT(PyModule_AddObjectRef(m, "ExtendedContext",
extended_context_template));


/* Init mpd_ssize_t constants */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can't add a comment there because Github, but CHECK_INT(PyModule_AddObject(m, ssize_cm->name, obj)); for obj on L6038 does not leak obj on failure because its reference count is 1 going into PyModule_AddObject and we Py_CLEAR it on goto error inside CHECK_INT.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you update the PR to add a comment about that?

Copy link
Member

Choose a reason for hiding this comment

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

Ping on this; there's also a merge conflict.

@hauntsaninja hauntsaninja marked this pull request as ready for review November 3, 2022 07:18
@rhettinger rhettinger removed their request for review November 4, 2022 01:27
@erlend-aasland
Copy link
Contributor

Superseded by Serhiy's #106858.

@hauntsaninja hauntsaninja deleted the gh-83004-decimal branch February 9, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants