summaryrefslogtreecommitdiff
path: root/server/providers
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2009-12-02 21:26:37 +0100
committerStephen Gallagher <sgallagh@redhat.com>2009-12-03 10:26:21 -0500
commitbb4f29cd71bd7586c2fb2de2c7b2b1c9d21d1c91 (patch)
treed4c4e13c6449be064a7f9cd92fe5598077ebd71b /server/providers
parentf1dbd630abdc2022f3bfe7e08331d39645119103 (diff)
downloadsssd-bb4f29cd71bd7586c2fb2de2c7b2b1c9d21d1c91.tar.gz
sssd-bb4f29cd71bd7586c2fb2de2c7b2b1c9d21d1c91.tar.bz2
sssd-bb4f29cd71bd7586c2fb2de2c7b2b1c9d21d1c91.zip
Check LDAP structure before calling ldap_unbind_ext()
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;