Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 50c584f

Browse files
committed
ceval: tighten the code of STORE_ANNOTATION
1 parent eb63645 commit 50c584f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Python/ceval.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1921,11 +1921,10 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
19211921
err = PyObject_SetItem(ann_dict, name, ann);
19221922
}
19231923
Py_DECREF(ann_dict);
1924+
Py_DECREF(ann);
19241925
if (err != 0) {
1925-
Py_DECREF(ann);
19261926
goto error;
19271927
}
1928-
Py_DECREF(ann);
19291928
DISPATCH();
19301929
}
19311930

0 commit comments

Comments
 (0)