summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorEclips4 <80244920+Eclips4@users.noreply.github.com>2023-02-18 00:52:23 (GMT)
committerGitHub <noreply@github.com>2023-02-18 00:52:23 (GMT)
commit89413bbccb9261b72190e275eefe4b0d49671477 (patch)
tree43e4557cfba22f33f12dd50e0f95fa4f8c8fdc08 /Python
parent7f1c72175600b21c1c840e8988cc6e6b4b244582 (diff)
downloadcpython-89413bbccb9261b72190e275eefe4b0d49671477.zip
cpython-89413bbccb9261b72190e275eefe4b0d49671477.tar.gz
cpython-89413bbccb9261b72190e275eefe4b0d49671477.tar.bz2
gh-101967: add a missing error check (#101968)
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 09fd2f2..308ef52 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1255,7 +1255,9 @@ positional_only_passed_as_keyword(PyThreadState *tstate, PyCodeObject *co,
{
int posonly_conflicts = 0;
PyObject* posonly_names = PyList_New(0);
-
+ if (posonly_names == NULL) {
+ goto fail;
+ }
for(int k=0; k < co->co_posonlyargcount; k++){
PyObject* posonly_name = PyTuple_GET_ITEM(co->co_localsplusnames, k);