diff Python/sysmodule.c @ 14017:128f641191c3 legacy-trunk

_PySys_Init(): Fix another Insure discovered memory leak; the PyString created from the "big"/"little" constant needs to be decref'd.
author Barry Warsaw <barry@python.org>
date Wed, 16 Aug 2000 23:03:57 +0000
parents eb9a36163a9e
children e5253b692e9f
line wrap: on
line diff
--- a/Python/sysmodule.c	Wed Aug 16 22:29:55 2000 +0000
+++ b/Python/sysmodule.c	Wed Aug 16 23:03:57 2000 +0000
@@ -469,7 +469,8 @@
 		else
 			value = "little";
 		PyDict_SetItemString(sysdict, "byteorder",
-				     PyString_FromString(value));
+				     v = PyString_FromString(value));
+		Py_XDECREF(v);
 	}
 #ifdef MS_COREDLL
 	PyDict_SetItemString(sysdict, "dllhandle",