]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Quiet lsan
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 17 Dec 2020 14:40:48 +0000 (08:40 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 17 Dec 2020 14:40:48 +0000 (08:40 -0600)
src/modules/rlm_python/rlm_python.c

index f4d131f35e3186a3fc9346a8ccf2636a5a1aec36..33a267c7c451b7ae065cde660a974d015ec57190 100644 (file)
@@ -1149,7 +1149,12 @@ static void mod_unload(void)
        PyThreadState_Swap(global_interpreter); /* Swap to the main thread */
        if (default_path) PyMem_Free(default_path);
 
-       Py_Finalize();
+       /*
+        *      PyImport_Cleanup - Leaks memory in python 3.6
+        *      should check once we require 3.8 that this is
+        *      still needed.
+        */
+       LSAN_DISABLE(Py_Finalize());                    /* Ignore leaks on exit, we don't reload modules so we don't care */
        if (python_dlhandle) dlclose(python_dlhandle);  /* dlclose will SEGV on null handle */
 }