-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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
Conversation
hauntsaninja
commented
Nov 3, 2022
•
edited by bedevere-bot
Loading
edited by bedevere-bot
- Issue: Improve stdlib module initialization error handling. #83004
CHECK_INT(PyModule_AddObject(m, "ExtendedContext", | ||
extended_context_template)); | ||
CHECK_INT(PyModule_AddObjectRef(m, "ExtendedContext", | ||
extended_context_template)); | ||
|
||
|
||
/* Init mpd_ssize_t constants */ |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Superseded by Serhiy's #106858. |