mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
fix use after free (closes #24552)
This commit is contained in:
parent
b7a688b3a4
commit
80f78a3efc
3 changed files with 15 additions and 1 deletions
|
@ -5210,10 +5210,10 @@ load_newobj_ex(UnpicklerObject *self)
|
|||
if (!PyType_Check(cls)) {
|
||||
Py_DECREF(kwargs);
|
||||
Py_DECREF(args);
|
||||
Py_DECREF(cls);
|
||||
PyErr_Format(st->UnpicklingError,
|
||||
"NEWOBJ_EX class argument must be a type, not %.200s",
|
||||
Py_TYPE(cls)->tp_name);
|
||||
Py_DECREF(cls);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue