From: sobolevn Date: Wed, 24 Jul 2024 12:47:52 +0000 (+0300) Subject: gh-122229: Add missing `Py_DECREF` in `func_get_annotation_dict` (#122230) X-Git-Tag: v3.14.0a1~1002 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e9681211b9ad11d1c1f471c43bc57cac46814779;p=thirdparty%2FPython%2Fcpython.git gh-122229: Add missing `Py_DECREF` in `func_get_annotation_dict` (#122230) --- diff --git a/Objects/funcobject.c b/Objects/funcobject.c index 40211297be20..8df0da800980 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; } }