mirror of https://github.com/python/cpython
[3.13] gh-121660: Fix `ga_getitem` by explicitly checking for `NULL` result (GH-121661) (#121761)
gh-121660: Fix `ga_getitem` by explicitly checking for `NULL` result (GH-121661)
(cherry picked from commit bb802db8cf
)
Co-authored-by: sobolevn <mail@sobolevn.me>
This commit is contained in:
parent
295b791cf4
commit
97b06d543f
|
@ -561,6 +561,10 @@ ga_getitem(PyObject *self, PyObject *item)
|
|||
}
|
||||
|
||||
PyObject *res = Py_GenericAlias(alias->origin, newargs);
|
||||
if (res == NULL) {
|
||||
Py_DECREF(newargs);
|
||||
return NULL;
|
||||
}
|
||||
((gaobject *)res)->starred = alias->starred;
|
||||
|
||||
Py_DECREF(newargs);
|
||||
|
|
Loading…
Reference in New Issue