Skip to content

gh-132413: Clear weakref to _datetime after modules are finalized #136152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from
Prev Previous commit
Next Next commit
Add a missing NULL check
  • Loading branch information
neonene authored Jul 1, 2025
commit 26c6425a431d5d19a54f90478c89ce02c11793be
9 changes: 6 additions & 3 deletions Python/pylifecycle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1546,9 +1546,12 @@ static PyObject*
finalize_remove_modules(PyObject *modules, int verbose)
{
PyObject *weaklist = PyList_New(0);
PyObject *weak_ext = PyList_New(0); // for extending the weaklist
if (weak_ext == NULL) {
Py_CLEAR(weaklist);
PyObject *weak_ext = NULL; // for extending the weaklist
if (weaklist != NULL) {
weak_ext = PyList_New(0);
if (weak_ext == NULL) {
Py_CLEAR(weaklist);
}
}
if (weaklist == NULL) {
PyErr_FormatUnraisable("Exception ignored while removing modules");
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy