[Python-checkins] Fix NULL check in test_type_from_ephemeral_spec in_testcapimodule.c (GH-92863)
serhiy-storchaka
webhook-mailer at python.org
Tue May 17 11:17:25 EDT 2022
https://github.com/python/cpython/commit/524f03c08ca6688785c0fe99d8f2b385bf92e58f
commit: 524f03c08ca6688785c0fe99d8f2b385bf92e58f
branch: main
author: Dennis Sweeney <36520290+sweeneyde at users.noreply.github.com>
committer: serhiy-storchaka <storchaka at gmail.com>
date: 2022-05-17T18:17:16+03:00
summary:
Fix NULL check in test_type_from_ephemeral_spec in_testcapimodule.c (GH-92863)
files:
M Modules/_testcapimodule.c
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 363dbbb666ca5..3bc776140aaba 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