From e9681211b9ad11d1c1f471c43bc57cac46814779 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Wed, 24 Jul 2024 15:47:52 +0300 Subject: [PATCH] gh-122229: Add missing `Py_DECREF` in `func_get_annotation_dict` (#122230) --- Objects/funcobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Objects/funcobject.c b/Objects/funcobject.c index 40211297be2..8df0da80098 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -547,6 +547,7 @@ func_get_annotation_dict(PyFunctionObject *op) PyTuple_GET_ITEM(ann_tuple, i + 1)); if (err < 0) { + Py_DECREF(ann_dict); return NULL; } }