There was an error while loading. Please reload this page.
1 parent dc5a4e1 commit 650365bCopy full SHA for 650365b
1 file changed
Modules/atexitmodule.c
@@ -211,6 +211,14 @@ atexit_clear(PyObject *self, PyObject *unused)
211
Py_RETURN_NONE;
212
}
213
214
+static void
215
+atexit_free(PyObject *m)
216
+{
217
+ atexitmodule_state *modstate;
218
+ modstate = GET_ATEXIT_STATE(m);
219
+ PyMem_Free(modstate->atexit_callbacks);
220
+}
221
+
222
PyDoc_STRVAR(atexit_unregister__doc__,
223
"unregister(func) -> None\n\
224
\n\
@@ -275,7 +283,7 @@ static struct PyModuleDef atexitmodule = {
275
283
NULL,
276
284
277
285
278
- NULL
286
+ (freefunc)atexit_free
279
287
};
280
288
281
289
PyMODINIT_FUNC
0 commit comments