mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Fix SF bug #1546288, crash in dict_equal.
This commit is contained in:
parent
c4a70fbb78
commit
a22975fb35
3 changed files with 15 additions and 2 deletions
|
@ -1585,7 +1585,10 @@ dict_equal(dictobject *a, dictobject *b)
|
|||
/* temporarily bump aval's refcount to ensure it stays
|
||||
alive until we're done with it */
|
||||
Py_INCREF(aval);
|
||||
/* ditto for key */
|
||||
Py_INCREF(key);
|
||||
bval = PyDict_GetItem((PyObject *)b, key);
|
||||
Py_DECREF(key);
|
||||
if (bval == NULL) {
|
||||
Py_DECREF(aval);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue