Skip to content

Commit

Permalink
Fix NULL check in test_type_from_ephemeral_spec in_testcapimodule.c (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
sweeneyde committed May 17, 2022
1 parent 19a4252 commit 524f03c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/_testcapimodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 524f03c

Please sign in to comment.