Skip to content
Prev Previous commit
Next Next commit
fix use-after-free
  • Loading branch information
koubaa committed Aug 31, 2020
commit 6c7f4352ee3a73cfc212f4ba99615357cca9be1c
2 changes: 1 addition & 1 deletion Modules/md5module.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ newMD5object(MD5State * st)
static void
MD5_dealloc(PyObject *ptr)
{
PyObject_Del(ptr);
Py_DECREF(Py_TYPE(ptr));
PyObject_Del(ptr);
}


Expand Down
2 changes: 1 addition & 1 deletion Modules/sha1module.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ newSHA1object(SHA1State *st)
static void
SHA1_dealloc(PyObject *ptr)
{
PyObject_Del(ptr);
Py_DECREF(Py_TYPE(ptr));
PyObject_Del(ptr);
}


Expand Down
2 changes: 1 addition & 1 deletion Modules/sha512module.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,8 @@ static SHAobject *newSHA512object(SHA512State *st) {
static void
SHA512_dealloc(PyObject *ptr)
{
PyObject_Del(ptr);
Py_DECREF(Py_TYPE(ptr));
PyObject_Del(ptr);
}


Expand Down