Add free function for sudo Python module.

This reduces the amount of memory leaked on unload.
This commit is contained in:
Todd C. Miller
2023-07-25 09:33:03 -06:00
parent e59c487434
commit 1a00423afd
5 changed files with 30 additions and 5 deletions

View File

@@ -130,7 +130,7 @@ static PyMethodDef _sudo_LogHandler_class_methods[] =
int
sudo_module_set_default_loghandler()
{
debug_decl(sudo_module_register_loghandler, PYTHON_DEBUG_INTERNAL);
debug_decl(sudo_module_set_default_loghandler, PYTHON_DEBUG_INTERNAL);
PyObject *py_sudo, *py_logging_module = NULL, *py_logger = NULL,
*py_streamhandler = NULL, *py_class = NULL,