| commit | 8e54b1c4486527075ffbb85e8c3db923aedb5e54 | [log] [tgz] |
|---|---|---|
| author | Victor Stinner <victor.stinner@gmail.com> | Wed Jul 17 21:53:23 2013 +0200 |
| committer | Victor Stinner <victor.stinner@gmail.com> | Wed Jul 17 21:53:23 2013 +0200 |
| tree | 3438443674466d6d0061ffdb09734de0b93892ce | |
| parent | 0fae8f9083c9d362611b71b181dcec9d6af394e2 [diff] |
Issue #18408: Fix _PyImport_LoadDynamicModule(), handle PyUnicode_FromFormat() failure
diff --git a/Python/importdl.c b/Python/importdl.c index 0ea954c..b60f1c7 100644 --- a/Python/importdl.c +++ b/Python/importdl.c
@@ -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;