bpo-36333: Fix leaks in pymain_init and _PyPreConfig_ReadFromArgv by matrixise · Pull Request #12389 · python/cpython
Hum, I think that I will rewrite your PR because I'm in the middle of a big refactoring, and the correct fix for your bug requires more fixes.
But please write a separated PR for _PyRuntimeState_Fini.