summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorNeil Schemenauer <nas-github@arctrix.com>2017-12-08 00:24:59 (GMT)
committerGitHub <noreply@github.com>2017-12-08 00:24:59 (GMT)
commit11cc289490b7b275fc0a033e2b376a8d4c780d9b (patch)
tree854214098f962e0aaf639ba4b35e5af009e6ce5b /Python/import.c
parentdd431b32f4a599fff9c9cddfe9d48cc66b347481 (diff)
downloadcpython-11cc289490b7b275fc0a033e2b376a8d4c780d9b.zip
cpython-11cc289490b7b275fc0a033e2b376a8d4c780d9b.tar.gz
cpython-11cc289490b7b275fc0a033e2b376a8d4c780d9b.tar.bz2
Fix missing DECREF of mod. (#4749)
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c
index cc7417b..dc79685 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1735,6 +1735,7 @@ PyImport_ImportModuleLevelObject(PyObject *name, PyObject *globals,
}
}
else {
+ Py_XDECREF(mod);
mod = import_find_and_load(abs_name);
if (mod == NULL) {
goto error;