summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/common')
-rw-r--r--source4/lib/ldb/common/ldb_modules.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c
index ec71c8d042..b8f155d2f0 100644
--- a/source4/lib/ldb/common/ldb_modules.c
+++ b/source4/lib/ldb/common/ldb_modules.c
@@ -320,6 +320,7 @@ static void *ldb_dso_load_symbol(struct ldb_context *ldb, const char *name,
sym = dlsym(handle, symbol);
if (sym == NULL) {
+ dlclose(handle);
ldb_debug(ldb, LDB_DEBUG_ERROR, "no symbol `%s' found in %s: %s", symbol, path, dlerror());
return NULL;
}