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
@ -2109,6 +2109,7 @@ hashlib_init_constructors(PyObject *module)
|
|||||||
if (PyModule_AddObjectRef(module, "_constructors", proxy) < 0) {
|
if (PyModule_AddObjectRef(module, "_constructors", proxy) < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Py_DECREF(proxy);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user