diff options
author | Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> | 2022-02-26 16:35:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-26 16:35:03 (GMT) |
commit | 0d9b565e62a5fc8c3e9b8c64cce764fe084ccb2b (patch) | |
tree | 240f3538d78b4f390b97fc1e0a2c1e17102f0d49 /Python/pylifecycle.c | |
parent | edbee56d698ebb4489aa68311f44d104a23f5eb7 (diff) | |
download | cpython-0d9b565e62a5fc8c3e9b8c64cce764fe084ccb2b.zip cpython-0d9b565e62a5fc8c3e9b8c64cce764fe084ccb2b.tar.gz cpython-0d9b565e62a5fc8c3e9b8c64cce764fe084ccb2b.tar.bz2 |
Propagate errors (however unlikely) from _Py_Deepfreeze_Init() (GH-31596)
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r-- | Python/pylifecycle.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index a671bca..6153474 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -828,7 +828,9 @@ pycore_interp_init(PyThreadState *tstate) } // Intern strings in deep-frozen modules first so that others // can use it instead of creating a heap allocated string. - _Py_Deepfreeze_Init(); + if (_Py_Deepfreeze_Init() < 0) { + return _PyStatus_ERR("failed to initialize deep-frozen modules"); + } status = pycore_init_types(interp); if (_PyStatus_EXCEPTION(status)) { |