summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-12-10 02:26:36 -0800
committerGitHub <noreply@github.com>2018-12-10 02:26:36 -0800
commitfc79175f5e6424c4978ba9e9b9bc006778cdfd40 (patch)
tree1b91c5d27657f5d0d8a9e3a4cbbb88f6798ccad4 /Python
parentc83ec055a09137e4b24f70e3bb5f887dc0ae6e8e (diff)
downloadcpython-git-fc79175f5e6424c4978ba9e9b9bc006778cdfd40.tar.gz
bpo-35451: Fix reference counting for sys.warnoptions and sys._xoptions. (GH-11063)
(cherry picked from commit 72ff7b4c000f7b8199231a0eb1ca4b119fab40a5) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Python')
-rw-r--r--Python/sysmodule.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index f04403b76a..a048507381 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -1757,7 +1757,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;
@@ -1842,7 +1841,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;