Issue #18408: Fix _PyImport_LoadDynamicModule(), handle PyUnicode_FromFormat() failure
This commit is contained in:
parent
0fae8f9083
commit
8e54b1c448
|
@ -77,6 +77,8 @@ _PyImport_LoadDynamicModule(PyObject *name, PyObject *path, FILE *fp)
|
|||
PyObject *msg = PyUnicode_FromFormat("dynamic module does not define "
|
||||
"init function (PyInit_%s)",
|
||||
shortname);
|
||||
if (msg == NULL)
|
||||
goto error;
|
||||
PyErr_SetImportError(msg, name, path);
|
||||
Py_DECREF(msg);
|
||||
goto error;
|
||||
|
|
Loading…
Reference in New Issue