gh-131316: fix invalid DECREF
in _md5.md5.copy()
(#135291)
This amends commit 261633bd3f48607478f50d12d8025cd4bb36f6f4.
This commit is contained in:
parent
8441b263af
commit
c19e36cc4e
@ -120,7 +120,7 @@ MD5Type_copy_impl(MD5object *self, PyTypeObject *cls)
|
||||
newobj->hash_state = Hacl_Hash_MD5_copy(self->hash_state);
|
||||
LEAVE_HASHLIB(self);
|
||||
if (newobj->hash_state == NULL) {
|
||||
Py_DECREF(self);
|
||||
Py_DECREF(newobj);
|
||||
return PyErr_NoMemory();
|
||||
}
|
||||
return (PyObject *)newobj;
|
||||
|
Loading…
x
Reference in New Issue
Block a user