summaryrefslogtreecommitdiff
path: root/Python/importdl.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-07-30 20:09:36 +0200
committerAntoine Pitrou <solipsis@pitrou.net>2013-07-30 20:09:36 +0200
commitdea573ec3aa5f526017a9b121cc574173f7e0e7f (patch)
tree643be57ade4e8b3a9960b7addd96c6bba6f2e85f /Python/importdl.c
parentcd097b5262a96c2bea85ad0000c269ceea9f5089 (diff)
parent3e0aaf3e7d782ca7e08de2ba352be9c80d634dbe (diff)
downloadcpython-dea573ec3aa5f526017a9b121cc574173f7e0e7f.tar.gz
Merge doc fix
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;