summaryrefslogtreecommitdiff
path: root/server/providers
diff options
context:
space:
mode:
Diffstat (limited to 'server/providers')
-rw-r--r--server/providers/ldap/sdap_async.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/providers/ldap/sdap_async.c b/server/providers/ldap/sdap_async.c
index 5a90339e..fd9b4bae 100644
--- a/server/providers/ldap/sdap_async.c
+++ b/server/providers/ldap/sdap_async.c
@@ -107,7 +107,9 @@ static void sdap_handle_release(struct sdap_handle *sh)
if (op == sh->ops) talloc_free(op);
}
- ldap_unbind_ext(sh->ldap, NULL, NULL);
+ if (sh->ldap) {
+ ldap_unbind_ext(sh->ldap, NULL, NULL);
+ }
sh->connected = false;
sh->ldap = NULL;
sh->ops = NULL;