mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-35454: Fix miscellaneous minor issues in error handling. (#11077)
* bpo-35454: Fix miscellaneous minor issues in error handling. * Fix a null pointer dereference.
This commit is contained in:
parent
bb86bf4c4e
commit
8905fcc85a
9 changed files with 44 additions and 23 deletions
|
@ -352,7 +352,10 @@ get_attrib_from_keywords(PyObject *kwds)
|
|||
return NULL;
|
||||
}
|
||||
attrib = PyDict_Copy(attrib);
|
||||
PyDict_DelItem(kwds, attrib_str);
|
||||
if (attrib && PyDict_DelItem(kwds, attrib_str) < 0) {
|
||||
Py_DECREF(attrib);
|
||||
attrib = NULL;
|
||||
}
|
||||
} else {
|
||||
attrib = PyDict_New();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue