summaryrefslogtreecommitdiffstats
path: root/source/lib/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/lib/module.c')
-rw-r--r--source/lib/module.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/lib/module.c b/source/lib/module.c
index c5bf89bd980..49121d12ca1 100644
--- a/source/lib/module.c
+++ b/source/lib/module.c
@@ -40,9 +40,12 @@ static NTSTATUS do_smb_load_module(const char *module_name, BOOL is_probe)
*/
handle = sys_dlopen(module_name, RTLD_LAZY);
+ /* This call should reset any possible non-fatal errors that
+ occured since last call to dl* functions */
+ error = sys_dlerror();
+
if(!handle) {
int level = is_probe ? 3 : 0;
- error = sys_dlerror();
DEBUG(level, ("Error loading module '%s': %s\n", module_name, error ? error : ""));
return NT_STATUS_UNSUCCESSFUL;
}