mirror of https://github.com/python/cpython.git
[3.13] gh-128198: Add missing error checks for usages of PyIter_Next() (GH-128199) (GH-128272)
(cherry picked from commit 5c814c83cd
)
Co-authored-by: Yan Yanchii <yyanchiy@gmail.com>
This commit is contained in:
parent
32adae1a10
commit
c30cad0638
|
@ -263,6 +263,10 @@ framelocalsproxy_merge(PyObject* self, PyObject* other)
|
||||||
|
|
||||||
Py_DECREF(iter);
|
Py_DECREF(iter);
|
||||||
|
|
||||||
|
if (PyErr_Occurred()) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -141,6 +141,10 @@ namespace_repr(PyObject *ns)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (PyErr_Occurred()) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
separator = PyUnicode_FromString(", ");
|
separator = PyUnicode_FromString(", ");
|
||||||
if (separator == NULL)
|
if (separator == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
Loading…
Reference in New Issue