From 524f03c08ca6688785c0fe99d8f2b385bf92e58f Mon Sep 17 00:00:00 2001 From: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com> Date: Tue, 17 May 2022 11:17:16 -0400 Subject: [PATCH] Fix NULL check in test_type_from_ephemeral_spec in_testcapimodule.c (GH-92863) --- Modules/_testcapimodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.47.2