diff options
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/dictobject.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 70f05e5..82e82a8 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -400,8 +400,10 @@ insertdict(register dictobject *mp, PyObject *key, long hash, PyObject *value) else { if (ep->me_key == NULL) mp->ma_fill++; - else - Py_DECREF(ep->me_key); + else { + assert(ep->me_key == dummy); + Py_DECREF(dummy); + } ep->me_key = key; ep->me_hash = hash; ep->me_value = value; |