bpo-36447, bpo-36447: Fix refleak in _PySys_InitMain() (GH-12586)

Fix refleak in sysmodule.c when calling SET_SYS_FROM_STRING_BORROW.
This commit is contained in:
Pablo Galindo 2019-03-27 12:43:47 +00:00 committed by Victor Stinner
parent 5ac27a50ff
commit 34ef64fe59
1 changed files with 1 additions and 0 deletions

View File

@ -2635,6 +2635,7 @@ _PySys_InitMain(PyInterpreterState *interp)
return -1;
}
SET_SYS_FROM_STRING_BORROW("_xoptions", xoptions);
Py_DECREF(xoptions);
#undef COPY_LIST
#undef SET_SYS_FROM_WSTR