mirror of https://github.com/python/cpython
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:
parent
5ac27a50ff
commit
34ef64fe59
|
@ -2635,6 +2635,7 @@ _PySys_InitMain(PyInterpreterState *interp)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
SET_SYS_FROM_STRING_BORROW("_xoptions", xoptions);
|
SET_SYS_FROM_STRING_BORROW("_xoptions", xoptions);
|
||||||
|
Py_DECREF(xoptions);
|
||||||
|
|
||||||
#undef COPY_LIST
|
#undef COPY_LIST
|
||||||
#undef SET_SYS_FROM_WSTR
|
#undef SET_SYS_FROM_WSTR
|
||||||
|
|
Loading…
Reference in New Issue