Stop using un-needed variable 'handle', this variable is not used
anywhere later.
Also load_module() internally allocates and uses handle, which suffice
for its operation.
This fixes resource leak issue reported by coverity #
1412633
Signed-off-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Fri Aug 15 06:19:51 UTC 2025 on atb-devel-224
static NTSTATUS load_module_absolute_path(const char *module_path,
bool is_probe)
{
- void *handle;
init_module_fn init;
NTSTATUS status;
is_probe ? "Probing" : "Loading",
module_path);
- init = load_module(module_path, is_probe, &handle);
+ init = load_module(module_path, is_probe, NULL);
if (init == NULL) {
return NT_STATUS_UNSUCCESSFUL;
}
DBG_ERR("Module '%s' initialization failed: %s\n",
module_path,
get_friendly_nt_error_msg(status));
- dlclose(handle);
return status;
}