Commit 59ffb457 authored by Victor Stinner's avatar Victor Stinner

Issue #18408: Fix _PyImport_LoadDynamicModule(), handle PyUnicode_FromFormat() failure

parent 868e88e6
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment