summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/import.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c
index 0bf5d47..2707019 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1858,6 +1858,7 @@ PyImport_Import(module_name)
/* Get the builtins from current globals */
globals = PyEval_GetGlobals();
if(globals != NULL) {
+ Py_INCREF(globals);
builtins = PyObject_GetItem(globals, builtins_str);
if (builtins == NULL)
goto err;