diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-09-05 01:54:06 +0000 |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-09-05 01:54:06 +0000 |
commit | d3da7d394a64f3894b625842da4e5cc2f13bac08 (patch) | |
tree | 8f6985356ef22ec5910cef7443b217e8099b44db /Objects/dictobject.c | |
parent | 8568752268bf721228ca989a2b572d4e3bf6275a (diff) | |
download | cpython-git-d3da7d394a64f3894b625842da4e5cc2f13bac08.tar.gz |
Fix SF bug #1546288, crash in dict_equal
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r-- | Objects/dictobject.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index f3b6b7fda6..4e827980b5 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -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; |