mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +00:00
bpo-40645: Fix reference leak in the _hashopenssl extension (GH-26072)
The `PyModule_AddObjectRef` function doesn't steal a reference, so an extra `Py_DECREF` is needed. Automerge-Triggered-By: GH:tiran
This commit is contained in:
parent
c40486a32d
commit
3611db53f5
1 changed files with 1 additions and 0 deletions
|
@ -2109,6 +2109,7 @@ hashlib_init_constructors(PyObject *module)
|
|||
if (PyModule_AddObjectRef(module, "_constructors", proxy) < 0) {
|
||||
return -1;
|
||||
}
|
||||
Py_DECREF(proxy);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue