commit | a22975fb35e1bae0f85fc6ede1572264a7bcd1e6 | [log] [tgz] |
---|---|---|
author | Neal Norwitz <nnorwitz@gmail.com> | Tue Sep 05 02:24:03 2006 +0000 |
committer | Neal Norwitz <nnorwitz@gmail.com> | Tue Sep 05 02:24:03 2006 +0000 |
tree | 4010d55ca48619982bced6b5d41dacd575c6b350 | |
parent | c4a70fbb78211261c9edf4a80029a124bb3cc826 [diff] [blame] |
Fix SF bug #1546288, crash in dict_equal.
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index f3b6b7f..4e82798 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c
@@ -1585,7 +1585,10 @@ /* 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;