gh-83004: Clean up refleaks in _decimal initialisation by hauntsaninja · Pull Request #99043 · python/cpython
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.
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?
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.