Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f2581c9

Browse files
committed
_PySys_Init(): Fix another Insure discovered memory leak; the PyString
created from the "big"/"little" constant needs to be decref'd.
1 parent 239548f commit f2581c9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Python/sysmodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,8 @@ _PySys_Init(void)
469469
else
470470
value = "little";
471471
PyDict_SetItemString(sysdict, "byteorder",
472-
PyString_FromString(value));
472+
v = PyString_FromString(value));
473+
Py_XDECREF(v);
473474
}
474475
#ifdef MS_COREDLL
475476
PyDict_SetItemString(sysdict, "dllhandle",

0 commit comments

Comments
 (0)