summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2000-08-16 23:03:57 (GMT)
committerBarry Warsaw <barry@python.org>2000-08-16 23:03:57 (GMT)
commitf2581c97f202c35886e649bacccef1a46ed5dd2b (patch)
tree36a54744788001cddaac8e27fcb7d9a770d53023 /Python/sysmodule.c
parent239548f37da61f31206f9db912d7897431971b63 (diff)
downloadcpython-f2581c97f202c35886e649bacccef1a46ed5dd2b.zip
cpython-f2581c97f202c35886e649bacccef1a46ed5dd2b.tar.gz
cpython-f2581c97f202c35886e649bacccef1a46ed5dd2b.tar.bz2
_PySys_Init(): Fix another Insure discovered memory leak; the PyString
created from the "big"/"little" constant needs to be decref'd.
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 3026b66..51a85e0 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",