From: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com> Date: Tue, 17 May 2022 15:17:16 +0000 (-0400) Subject: Fix NULL check in test_type_from_ephemeral_spec in_testcapimodule.c (GH-92863) X-Git-Tag: v3.12.0a1~1522 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=524f03c08ca6688785c0fe99d8f2b385bf92e58f;p=thirdparty%2FPython%2Fcpython.git Fix NULL check in test_type_from_ephemeral_spec in_testcapimodule.c (GH-92863) --- diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 363dbbb666ca..3bc776140aab 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -1221,7 +1221,7 @@ test_type_from_ephemeral_spec(PyObject *self, PyObject *Py_UNUSED(ignored)) memcpy(name, NAME, sizeof(NAME)); doc = PyMem_New(char, sizeof(DOC)); - if (name == NULL) { + if (doc == NULL) { PyErr_NoMemory(); goto finally; }