Skip to content

Commit bdfe8c9

Browse files
sobolevnnohlson
authored andcommitted
pythongh-122229: Add missing Py_DECREF in func_get_annotation_dict (python#122230)
1 parent c81dba7 commit bdfe8c9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Objects/funcobject.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,7 @@ func_get_annotation_dict(PyFunctionObject *op)
547547
PyTuple_GET_ITEM(ann_tuple, i + 1));
548548

549549
if (err < 0) {
550+
Py_DECREF(ann_dict);
550551
return NULL;
551552
}
552553
}

0 commit comments

Comments
 (0)