summaryrefslogtreecommitdiff
path: root/Python/importdl.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-07-22 16:34:28 +0200
committerChristian Heimes <christian@cheimes.de>2013-07-22 16:34:28 +0200
commitb2decdab33ce8b74051a8dcddfa409d7f9af8fb1 (patch)
treed58fc597874e0c5bb3e878ed2b446bcb606f5f04 /Python/importdl.c
parentb69651179a1ac37b3e959a404388ce9fc1b273f8 (diff)
parentedc97951e09d9ea20937dbddf4b0d9b09c6cb463 (diff)
downloadcpython-b2decdab33ce8b74051a8dcddfa409d7f9af8fb1.tar.gz
Some compilers complain about 'control reaches end of non-void function'
because they don't understand that Py_FatalError() terminates the program.
Diffstat (limited to 'Python/importdl.c')
-rw-r--r--Python/importdl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/importdl.c b/Python/importdl.c
index 0ea954cae0..b60f1c75fb 100644
--- a/Python/importdl.c
+++ b/Python/importdl.c
@@ -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;