Mercurial > cpython-lru_cache-weakref
diff Python/importdl.c @ 84693:479af6ca3a3c
Issue #18408: Fix _PyImport_LoadDynamicModule(), handle PyUnicode_FromFormat() failure
| author | Victor Stinner <victor.stinner@gmail.com> |
|---|---|
| date | Wed, 17 Jul 2013 21:53:23 +0200 |
| parents | fce581643cb6 |
| children |
line wrap: on
line diff
--- a/Python/importdl.c Wed Jul 17 21:51:42 2013 +0200 +++ b/Python/importdl.c Wed Jul 17 21:53:23 2013 +0200 @@ -77,6 +77,8 @@ 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;
