From 50c584f50bea9a292337a5e8693428277408060b Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Thu, 8 Sep 2016 23:38:21 -0700 Subject: [PATCH] ceval: tighten the code of STORE_ANNOTATION --- Python/ceval.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Python/ceval.c b/Python/ceval.c index f737a2f3a03..75ec7b2abed 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1921,11 +1921,10 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag) err = PyObject_SetItem(ann_dict, name, ann); } Py_DECREF(ann_dict); + Py_DECREF(ann); if (err != 0) { - Py_DECREF(ann); goto error; } - Py_DECREF(ann); DISPATCH(); }