summaryrefslogtreecommitdiff
path: root/Python/importdl.c
diff options
context:
space:
mode:
authorEli Bendersky <eliben@gmail.com>2013-08-10 05:58:10 -0700
committerEli Bendersky <eliben@gmail.com>2013-08-10 05:58:10 -0700
commit2e74d253ec63d110af6e5a55bca22915fe374d60 (patch)
treeb979cae87c256ab318808ca78526c8aaf0e7d09e /Python/importdl.c
parentefdd3f26e3ca6220ddd8f7ce6a97fde9a14db45a (diff)
parentd265ba722d7eebdde6234372287ce58fdd232437 (diff)
downloadcpython-2e74d253ec63d110af6e5a55bca22915fe374d60.tar.gz
Issue #18668: Further clarify m_size setting for non-negative values
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;