We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57364ce commit 919d42dCopy full SHA for 919d42d
Objects/iterobject.c
@@ -368,7 +368,11 @@ PyTypeObject PyAnextAwaitable_Type = {
368
PyObject *
369
PyAnextAwaitable_New(PyObject *awaitable, PyObject *default_value)
370
{
371
- anextawaitableobject *anext = PyObject_GC_New(anextawaitableobject, &PyAnextAwaitable_Type);
+ anextawaitableobject *anext = PyObject_GC_New(
372
+ anextawaitableobject, &PyAnextAwaitable_Type);
373
+ if (anext == NULL) {
374
+ return NULL;
375
+ }
376
Py_INCREF(awaitable);
377
anext->wrapped = awaitable;
378
Py_INCREF(default_value);
0 commit comments