[Python-3000-checkins] r63893 - python/branches/py3k/Python/pythonrun.c
martin.v.loewis
python-3000-checkins at python.org
Tue Jun 3 20:57:14 CEST 2008
Author: martin.v.loewis
Date: Mon Jun 2 14:33:47 2008
New Revision: 63893
Log:
Fix uninitialized variable access, release memory.
Modified:
python/branches/py3k/Python/pythonrun.c
Modified: python/branches/py3k/Python/pythonrun.c
==============================================================================
--- python/branches/py3k/Python/pythonrun.c (original)
+++ python/branches/py3k/Python/pythonrun.c Mon Jun 2 14:33:47 2008
@@ -732,6 +732,7 @@
}
encoding = Py_GETENV("PYTHONIOENCODING");
+ errors = NULL;
if (encoding) {
encoding = strdup(encoding);
errors = strchr(encoding, ':');
@@ -825,6 +826,8 @@
status = -1;
}
+ if (encoding)
+ free(encoding);
Py_XDECREF(bimod);
Py_XDECREF(iomod);
return status;
More information about the Python-3000-checkins
mailing list