From: Howard Chu Date: Mon, 23 Mar 2009 11:38:24 +0000 (+0000) Subject: ITS#6030 don't reload already loaded modules X-Git-Tag: ACLCHECK_0~659 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fdda1ea70f487871d003859cd3d9d13ef0cd512f;p=openldap ITS#6030 don't reload already loaded modules --- diff --git a/servers/slapd/module.c b/servers/slapd/module.c index 25f5f3ae92..ae796d6c69 100644 --- a/servers/slapd/module.c +++ b/servers/slapd/module.c @@ -119,7 +119,7 @@ int module_unload( const char *file_name ) int module_load(const char* file_name, int argc, char *argv[]) { - module_loaded_t *module = NULL; + module_loaded_t *module; const char *error; int rc; MODULE_INIT_FN initialize; @@ -129,6 +129,11 @@ int module_load(const char* file_name, int argc, char *argv[]) #define file file_name #endif + /* silently ignore attempts to load a module that's already present */ + module = module_handle( file_name ); + if ( module ) + return 0; + module = (module_loaded_t *)ch_calloc(1, sizeof(module_loaded_t) + strlen(file_name)); if (module == NULL) {