mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Issue #18408: Fix _PyImport_LoadDynamicModule(), handle PyUnicode_FromFormat() failure
This commit is contained in:
parent
0fae8f9083
commit
8e54b1c448
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue