]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Probably want to free the path before finalizing
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 17 Dec 2020 06:39:14 +0000 (00:39 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 17 Dec 2020 06:39:14 +0000 (00:39 -0600)
src/modules/rlm_python/rlm_python.c

index de5cdc191191fe29c5b1c0c467d475427aa6cea4..cfc85f13ca8812651b36b8500226c9ae916e4f17 100644 (file)
@@ -1147,11 +1147,10 @@ static int mod_load(void)
 static void mod_unload(void)
 {
        PyThreadState_Swap(global_interpreter); /* Swap to the main thread */
+       if (default_path) PyMem_RawFree(default_path);
 
        Py_Finalize();
        if (python_dlhandle) dlclose(python_dlhandle);  /* dlclose will SEGV on null handle */
-
-       if (default_path) PyMem_RawFree(default_path);
 }
 
 /*