Skip to content

Commit f699151

Browse files
[3.12] gh-128198: Add missing error checks for usages of PyIter_Next() (GH-128199) (GH-128273)
(cherry picked from commit 5c814c8) Co-authored-by: Yan Yanchii <[email protected]>
1 parent 11b8909 commit f699151

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Objects/namespaceobject.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ namespace_repr(PyObject *ns)
121121
goto error;
122122
}
123123

124+
if (PyErr_Occurred()) {
125+
goto error;
126+
}
127+
124128
separator = PyUnicode_FromString(", ");
125129
if (separator == NULL)
126130
goto error;

0 commit comments

Comments
 (0)