Skip to content

Commit 34ef64f

Browse files
pablogsalvstinner
authored andcommitted
bpo-36447, bpo-36447: Fix refleak in _PySys_InitMain() (GH-12586)
Fix refleak in sysmodule.c when calling SET_SYS_FROM_STRING_BORROW.
1 parent 5ac27a5 commit 34ef64f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Python/sysmodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2635,6 +2635,7 @@ _PySys_InitMain(PyInterpreterState *interp)
26352635
return -1;
26362636
}
26372637
SET_SYS_FROM_STRING_BORROW("_xoptions", xoptions);
2638+
Py_DECREF(xoptions);
26382639

26392640
#undef COPY_LIST
26402641
#undef SET_SYS_FROM_WSTR

0 commit comments

Comments
 (0)