]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix NULL check in test_type_from_ephemeral_spec in_testcapimodule.c (GH-92863)
authorDennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
Tue, 17 May 2022 15:17:16 +0000 (11:17 -0400)
committerGitHub <noreply@github.com>
Tue, 17 May 2022 15:17:16 +0000 (18:17 +0300)
Modules/_testcapimodule.c

index 363dbbb666ca5ec6d2579cb3d5bad8459fd7910f..3bc776140aabaa394646f8d86efb3886ee2fd222 100644 (file)
@@ -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;
     }