From: Barry Warsaw Date: Wed, 16 Aug 2000 23:03:57 +0000 (+0000) Subject: _PySys_Init(): Fix another Insure discovered memory leak; the PyString X-Git-Tag: v2.0b1~414 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f2581c97f202c35886e649bacccef1a46ed5dd2b;p=thirdparty%2FPython%2Fcpython.git _PySys_Init(): Fix another Insure discovered memory leak; the PyString created from the "big"/"little" constant needs to be decref'd. --- diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 3026b66d1fb7..51a85e0a5ddd 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -469,7 +469,8 @@ _PySys_Init(void) else value = "little"; PyDict_SetItemString(sysdict, "byteorder", - PyString_FromString(value)); + v = PyString_FromString(value)); + Py_XDECREF(v); } #ifdef MS_COREDLL PyDict_SetItemString(sysdict, "dllhandle",