]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
_PySys_Init(): Fix another Insure discovered memory leak; the PyString
authorBarry Warsaw <barry@python.org>
Wed, 16 Aug 2000 23:03:57 +0000 (23:03 +0000)
committerBarry Warsaw <barry@python.org>
Wed, 16 Aug 2000 23:03:57 +0000 (23:03 +0000)
created from the "big"/"little" constant needs to be decref'd.

Python/sysmodule.c

index 3026b66d1fb75ebcef459176672b3034608ad595..51a85e0a5dddf50092f23944edae2dca9542a227 100644 (file)
@@ -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",