bpo-35451: Fix reference counting for sys.warnoptions and sys._xoptions. (GH-11063)

(cherry picked from commit 72ff7b4c00)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
Miss Islington (bot) 2018-12-10 02:26:36 -08:00 committed by GitHub
parent c83ec055a0
commit fc79175f5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 2 deletions

View File

@ -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;