summaryrefslogtreecommitdiff
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2000-08-16 23:03:57 +0000
committerBarry Warsaw <barry@python.org>2000-08-16 23:03:57 +0000
commit5441224011c8ed79a522d4234da607d0d0397a55 (patch)
treeb81e3191c611d0878ded623db51f02be18ca6613 /Python/sysmodule.c
parent8cd53f30afa84c5458a915e2859560b0401fda59 (diff)
downloadcpython-5441224011c8ed79a522d4234da607d0d0397a55.tar.gz
_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 3026b66d1f..51a85e0a5d 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",