Skip to content

Commit c19e36c

Browse files
authored
gh-131316: fix invalid DECREF in _md5.md5.copy() (#135291)
This amends commit 261633b.
1 parent 8441b26 commit c19e36c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/md5module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ MD5Type_copy_impl(MD5object *self, PyTypeObject *cls)
120120
newobj->hash_state = Hacl_Hash_MD5_copy(self->hash_state);
121121
LEAVE_HASHLIB(self);
122122
if (newobj->hash_state == NULL) {
123-
Py_DECREF(self);
123+
Py_DECREF(newobj);
124124
return PyErr_NoMemory();
125125
}
126126
return (PyObject *)newobj;

0 commit comments

Comments
 (0)