summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1999-01-29 21:30:22 +0000
committerBarry Warsaw <barry@python.org>1999-01-29 21:30:22 +0000
commit5809c45e9f86747c8e5afa1f6db7dd99026a215b (patch)
tree844c413bccdfb82ddafcc552f2528a5661bc81c8 /Python/pythonrun.c
parentda9d24f291e9f1c6f9bbb47309e94b53636211a0 (diff)
downloadcpython-5809c45e9f86747c8e5afa1f6db7dd99026a215b.tar.gz
initmain(): Nailed a memory leak. bimod must be DECREF'd!
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 6948829418..2d065cf22d 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -411,6 +411,7 @@ initmain()
if (bimod == NULL ||
PyDict_SetItemString(d, "__builtins__", bimod) != 0)
Py_FatalError("can't add __builtins__ to __main__");
+ Py_DECREF(bimod);
}
}