1 parent 868e88e commit 59ffb45Copy full SHA for 59ffb45
1 file changed
Python/importdl.c
@@ -77,6 +77,8 @@ _PyImport_LoadDynamicModule(PyObject *name, PyObject *path, FILE *fp)
77
PyObject *msg = PyUnicode_FromFormat("dynamic module does not define "
78
"init function (PyInit_%s)",
79
shortname);
80
+ if (msg == NULL)
81
+ goto error;
82
PyErr_SetImportError(msg, name, path);
83
Py_DECREF(msg);
84
goto error;
0 commit comments