summaryrefslogtreecommitdiff
path: root/Python/importdl.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-12-19 16:28:04 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2013-12-19 16:28:04 +0200
commit4227b17d9339bf04d5bc1af4a589eabaaa46703c (patch)
tree956667b1fe56f0c11ec7af6c85345a88e4be796e /Python/importdl.c
parent65ab1a2a0f28cdc19d18a84dcccbe18fdf15d858 (diff)
parentb283473939e00f8ee3b773edf64b4c0098ff2e38 (diff)
downloadcpython-4227b17d9339bf04d5bc1af4a589eabaaa46703c.tar.gz
Issue #18829: csv.Dialect() now checks type for delimiter, escapechar and
quotechar fields. Original patch by Vajrasky Kok.
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;