lib/crypto: add aes_gcm_128 support.
[samba.git] / lib / util / modules.c
index 05d1dac50f9bd2294fdf5f60a2cc089813437adb..828f33a0e1639095a255833b4e83da035d7f0003 100644 (file)
@@ -34,18 +34,10 @@ init_module_fn load_module(const char *path, bool is_probe, void **handle_out)
        void *init_fn;
        char *error;
 
-#if _SAMBA_BUILD_ == 3
-       /* Always try to use LAZY symbol resolving; if the plugin has
-        * backwards compatibility, there might be symbols in the
-        * plugin referencing to old (removed) functions
-        */
-       handle = dlopen(path, RTLD_LAZY);
-#else
        /* This should be a WAF build, where modules should be built
         * with no undefined symbols and are already linked against
         * the libraries that they are loaded by */
        handle = dlopen(path, RTLD_NOW);
-#endif
 
        /* This call should reset any possible non-fatal errors that
           occured since last call to dl* functions */
@@ -171,10 +163,6 @@ static NTSTATUS do_smb_load_module(const char *subsystem,
 
        /* Check for absolute path */
 
-       /* if we make any 'samba multibyte string'
-          calls here, we break
-          for loading string modules */
-
        DEBUG(5, ("%s module '%s'\n", is_probe ? "Probing" : "Loading", module_name));
 
        if (subsystem && module_name[0] != '/') {
@@ -196,6 +184,7 @@ static NTSTATUS do_smb_load_module(const char *subsystem,
        }
 
        if (!init) {
+               TALLOC_FREE(ctx);
                return NT_STATUS_UNSUCCESSFUL;
        }
 
@@ -207,7 +196,7 @@ static NTSTATUS do_smb_load_module(const char *subsystem,
                          module_name, get_friendly_nt_error_msg(status)));
                dlclose(handle);
        }
-
+       TALLOC_FREE(ctx);
        return status;
 }