mirror of
https://github.com/python/cpython.git
synced 2025-08-24 18:55: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
|
@ -5109,7 +5109,7 @@ unicode_concatenate(PyObject *v, PyObject *w,
|
|||
PyObject *names = f->f_code->co_names;
|
||||
PyObject *name = GETITEM(names, oparg);
|
||||
PyObject *locals = f->f_locals;
|
||||
if (PyDict_CheckExact(locals) &&
|
||||
if (locals && PyDict_CheckExact(locals) &&
|
||||
PyDict_GetItem(locals, name) == v) {
|
||||
if (PyDict_DelItem(locals, name) != 0) {
|
||||
PyErr_Clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue