summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-12-10 10:08:54 (GMT)
committerGitHub <noreply@github.com>2018-12-10 10:08:54 (GMT)
commit72ff7b4c000f7b8199231a0eb1ca4b119fab40a5 (patch)
tree3eca6bb697a3d48cef454931e7b8f225397f2628 /Python/sysmodule.c
parentf46eccd0ffe65333035c3820886295b71c41ab6e (diff)
downloadcpython-72ff7b4c000f7b8199231a0eb1ca4b119fab40a5.zip
cpython-72ff7b4c000f7b8199231a0eb1ca4b119fab40a5.tar.gz
cpython-72ff7b4c000f7b8199231a0eb1ca4b119fab40a5.tar.bz2
bpo-35451: Fix reference counting for sys.warnoptions and sys._xoptions. (GH-11063)
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 49fa384..e6f1c4e 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -1774,7 +1774,6 @@ get_warnoptions(void)
* call optional for embedding applications, thus making this
* reachable again.
*/
- Py_XDECREF(warnoptions);
warnoptions = PyList_New(0);
if (warnoptions == NULL)
return NULL;
@@ -1864,7 +1863,6 @@ get_xoptions(void)
* call optional for embedding applications, thus making this
* reachable again.
*/
- Py_XDECREF(xoptions);
xoptions = PyDict_New();
if (xoptions == NULL)
return NULL;