[Python-checkins] Fix NULL check in test_type_from_ephemeral_spec in_testcapimodule.c (GH-92863)
miss-islington
webhook-mailer at python.org
Tue May 17 11:48:06 EDT 2022
https://github.com/python/cpython/commit/5c826ef0a5b64157a5943867f2013e82a9ba81f9
commit: 5c826ef0a5b64157a5943867f2013e82a9ba81f9
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-05-17T08:47:50-07:00
summary:
Fix NULL check in test_type_from_ephemeral_spec in_testcapimodule.c (GH-92863)
(cherry picked from commit 524f03c08ca6688785c0fe99d8f2b385bf92e58f)
Co-authored-by: Dennis Sweeney <36520290+sweeneyde at users.noreply.github.com>
files:
M Modules/_testcapimodule.c
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index de1a8e6c20b6c..a2d9ac807400b 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;
}
More information about the Python-checkins
mailing list