Mercurial > cpython-lru_cache-weakref
diff Python/sysmodule.c @ 9964:d44cb87e500d legacy-trunk
_PySys_Init(): Nailed small memory leak. The stringobject created for
sys.version was missing a Py_XDECREF().
| author | Barry Warsaw <barry@python.org> |
|---|---|
| date | Wed, 27 Jan 1999 16:33:19 +0000 |
| parents | 030ee50bd8d1 |
| children | 66216f32403d |
line wrap: on
line diff
--- a/Python/sysmodule.c Wed Jan 27 15:48:23 1999 +0000 +++ b/Python/sysmodule.c Wed Jan 27 16:33:19 1999 +0000 @@ -400,6 +400,7 @@ 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);
