bpo-40645: Fix reference leak in the _hashopenssl extension by encukou · Pull Request #26072 · python/cpython
Comment on lines 2109 to +2112
| if (PyModule_AddObjectRef(module, "_constructors", proxy) < 0) { | ||
| return -1; | ||
| } | ||
| Py_DECREF(proxy); |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decref in case PyModule_AddObjectRef fails, no?
| if (PyModule_AddObjectRef(module, "_constructors", proxy) < 0) { | |
| return -1; | |
| } | |
| Py_DECREF(proxy); | |
| int rc = PyModule_AddObjectRef(module, "_constructors", proxy); | |
| Py_DECREF(proxy); | |
| if (rc < 0) { | |
| return -1; | |
| } |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@encukou: Status check is done, and it's a success ✅ .
Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖
Sorry @encukou, I had trouble checking out the 3.10 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 3611db53f5b854cb6d01ee5ebb5e11c87bcc2df5 3.10
Does this still need backport to 3.10?
I believe so, yes.
cc @pablogsal.
This indeed need to be backported
I can create a backport of this together with a backport of #26079, @pablogsal. Let me know if that's ok with you, @encukou.
Oh, I already did this in #26082 :) Backport is done; no further actions needed.