The branch, master has been updated
via ad753da08d2 lib: Re-add dlclose(handle) when module initialization
failed
from e5ba8cb6e97 dsdb: Align an integer type
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit ad753da08d20dbc7c069d623c6e55da480d54d69
Author: Volker Lendecke <[email protected]>
Date: Tue Aug 26 09:50:04 2025 +0200
lib: Re-add dlclose(handle) when module initialization failed
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Ralph Boehme <[email protected]>
Autobuild-User(master): Volker Lendecke <[email protected]>
Autobuild-Date(master): Mon Sep 1 17:04:27 UTC 2025 on atb-devel-224
-----------------------------------------------------------------------
Summary of changes:
lib/util/modules.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Changeset truncated at 500 lines:
diff --git a/lib/util/modules.c b/lib/util/modules.c
index cafc73d6259..b8d6e4cfcd1 100644
--- a/lib/util/modules.c
+++ b/lib/util/modules.c
@@ -151,6 +151,7 @@ init_module_fn *load_samba_modules(TALLOC_CTX *mem_ctx,
const char *subsystem)
static NTSTATUS load_module_absolute_path(const char *module_path,
bool is_probe)
{
+ void *handle = NULL;
init_module_fn init;
NTSTATUS status;
@@ -158,7 +159,7 @@ static NTSTATUS load_module_absolute_path(const char
*module_path,
is_probe ? "Probing" : "Loading",
module_path);
- init = load_module(module_path, is_probe, NULL);
+ init = load_module(module_path, is_probe, &handle);
if (init == NULL) {
return NT_STATUS_UNSUCCESSFUL;
}
@@ -170,6 +171,7 @@ static NTSTATUS load_module_absolute_path(const char
*module_path,
DBG_ERR("Module '%s' initialization failed: %s\n",
module_path,
get_friendly_nt_error_msg(status));
+ dlclose(handle);
return status;
}
--
Samba Shared Repository