Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 66318:6eabf8c1a75c
Issue #10255: Fix reference leak in Py_InitializeEx(). Patch by Neil
Schemenauer.
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Sat, 20 Nov 2010 19:50:57 +0000 |
| parents | 06f76ef27f86 |
| children | 724920a015f7 |
comparison
equal
deleted
inserted
replaced
| 66316:f5db53783922 | 66318:6eabf8c1a75c |
|---|---|
| 891 goto error; | 891 goto error; |
| 892 } | 892 } |
| 893 | 893 |
| 894 /* Set builtins.open */ | 894 /* Set builtins.open */ |
| 895 if (PyObject_SetAttrString(bimod, "open", wrapper) == -1) { | 895 if (PyObject_SetAttrString(bimod, "open", wrapper) == -1) { |
| 896 Py_DECREF(wrapper); | |
| 896 goto error; | 897 goto error; |
| 897 } | 898 } |
| 899 Py_DECREF(wrapper); | |
| 898 | 900 |
| 899 encoding = Py_GETENV("PYTHONIOENCODING"); | 901 encoding = Py_GETENV("PYTHONIOENCODING"); |
| 900 errors = NULL; | 902 errors = NULL; |
| 901 if (encoding) { | 903 if (encoding) { |
| 902 encoding = strdup(encoding); | 904 encoding = strdup(encoding); |
