summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-02-21 13:01:15 (GMT)
committerGitHub <noreply@github.com>2023-02-21 13:01:15 (GMT)
commit1633aea0e430f4c0d115b1ea5baac5daaecf81ff (patch)
treef610c7756f3e82d66225146eee6c947d4fce3058 /Python/ceval.c
parent78eee7618534d09121c7bb4e47b43ef5867a2a16 (diff)
downloadcpython-1633aea0e430f4c0d115b1ea5baac5daaecf81ff.zip
cpython-1633aea0e430f4c0d115b1ea5baac5daaecf81ff.tar.gz
cpython-1633aea0e430f4c0d115b1ea5baac5daaecf81ff.tar.bz2
[3.11] gh-101967: add a missing error check (GH-101968) (#102015)
gh-101967: add a missing error check (GH-101968) (cherry picked from commit 89413bbccb9261b72190e275eefe4b0d49671477) Co-authored-by: Eclips4 <80244920+Eclips4@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 01ac261..96d215a 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -6006,7 +6006,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);