]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
ceval: tighten the code of STORE_ANNOTATION
authorYury Selivanov <yury@magic.io>
Fri, 9 Sep 2016 06:38:21 +0000 (23:38 -0700)
committerYury Selivanov <yury@magic.io>
Fri, 9 Sep 2016 06:38:21 +0000 (23:38 -0700)
Python/ceval.c

index f737a2f3a03676f8929eaa0defac4cae4b230859..75ec7b2abed5aec1dcc54c1b7352ac2f816e1dff 100644 (file)
@@ -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();
         }