From 54892c4b2cac50cc698be2ebede663b781cf4a37 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Wed, 27 Jan 1999 16:33:19 +0000 Subject: _PySys_Init(): Nailed small memory leak. The stringobject created for sys.version was missing a Py_XDECREF(). --- Python/sysmodule.c | 1 + 1 file changed, 1 insertion(+) 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); -- cgit v0.12