mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-121660: Fix ga_getitem
by explicitly checking for NULL
result (#121661)
This commit is contained in:
parent
6505bda85a
commit
bb802db8cf
1 changed files with 4 additions and 0 deletions
|
@ -563,6 +563,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…
Add table
Add a link
Reference in a new issue