summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1999-01-27 16:33:19 (GMT)
committerBarry Warsaw <barry@python.org>1999-01-27 16:33:19 (GMT)
commit54892c4b2cac50cc698be2ebede663b781cf4a37 (patch)
tree4a836f1b8cad7c92d77afd9400a6a13b95671539
parentda452bf6a7b2063b50ba608ebbef3341f1a7109d (diff)
downloadcpython-54892c4b2cac50cc698be2ebede663b781cf4a37.zip
cpython-54892c4b2cac50cc698be2ebede663b781cf4a37.tar.gz
cpython-54892c4b2cac50cc698be2ebede663b781cf4a37.tar.bz2
_PySys_Init(): Nailed small memory leak. The stringobject created for
sys.version was missing a Py_XDECREF().
-rw-r--r--Python/sysmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index fb4ab96..5a066a5 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -400,6 +400,7 @@ _PySys_Init()
Py_XDECREF(syserr);
PyDict_SetItemString(sysdict, "version",
v = PyString_FromString(Py_GetVersion()));
+ Py_XDECREF(v);
PyDict_SetItemString(sysdict, "hexversion",
v = PyInt_FromLong(PY_VERSION_HEX));
Py_XDECREF(v);