https://github.com/python/cpython/commit/e9681211b9ad11d1c1f471c43bc57cac46814779
commit: e9681211b9ad11d1c1f471c43bc57cac46814779
branch: main
author: sobolevn <[email protected]>
committer: JelleZijlstra <[email protected]>
date: 2024-07-24T05:47:52-07:00
summary:
gh-122229: Add missing `Py_DECREF` in `func_get_annotation_dict` (#122230)
files:
M Objects/funcobject.c
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index 40211297be20c0..8df0da800980a9 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;
}
}
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]