Leak memory rather than dying on HUP.
authoraland <aland>
Sun, 8 Apr 2007 06:56:57 +0000 (06:56 +0000)
committeraland <aland>
Sun, 8 Apr 2007 06:56:57 +0000 (06:56 +0000)
It leaks ~300 bytes per module instance on every HUP.  i.e. 10k
per HUP on a typical installation.

Addresses bug #426

src/main/modules.c

index c386b0b..987fe36 100644 (file)
@@ -730,9 +730,14 @@ int setup_modules(void)
                for (comp = 0; comp < RLM_COMPONENT_COUNT; comp++) {
                        components[comp] = NULL;
                }
-
        } else {
-               detach_modules();
+               /*
+                *      Else do NOT detach modules.  Instead, just
+                *      forget about any module instances we may have
+                *      previously loaded.  While this leaks memory,
+                *      it's better than the server crashing.
+                */
+               module_instance_list = NULL;
        }
 
        /*