aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/coreconfig.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/coreconfig.c')
-rw-r--r--Python/coreconfig.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/Python/coreconfig.c b/Python/coreconfig.c
index c20ae2151c9..634891ed214 100644
--- a/Python/coreconfig.c
+++ b/Python/coreconfig.c
@@ -2021,26 +2021,22 @@ core_read_precmdline(_PyCoreConfig *config, _PyPreCmdline *precmdline)
_PyPreConfig preconfig = _PyPreConfig_INIT;
if (_PyPreConfig_Copy(&preconfig, &_PyRuntime.preconfig) < 0) {
err = _Py_INIT_NO_MEMORY();
- goto done;
+ return err;
}
_PyCoreConfig_GetCoreConfig(&preconfig, config);
err = _PyPreCmdline_Read(precmdline, &preconfig);
if (_Py_INIT_FAILED(err)) {
- goto done;
+ return err;
}
if (_PyPreCmdline_SetCoreConfig(precmdline, config) < 0) {
err = _Py_INIT_NO_MEMORY();
- goto done;
+ return err;
}
- err = _Py_INIT_OK();
-
-done:
- _PyPreConfig_Clear(&preconfig);
- return err;
+ return _Py_INIT_OK();
}