mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +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
|
@ -777,9 +777,11 @@ local_clear(localobject *self)
|
|||
for(tstate = PyInterpreterState_ThreadHead(tstate->interp);
|
||||
tstate;
|
||||
tstate = PyThreadState_Next(tstate))
|
||||
if (tstate->dict &&
|
||||
PyDict_GetItem(tstate->dict, self->key))
|
||||
PyDict_DelItem(tstate->dict, self->key);
|
||||
if (tstate->dict && PyDict_GetItem(tstate->dict, self->key)) {
|
||||
if (PyDict_DelItem(tstate->dict, self->key)) {
|
||||
PyErr_Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue