From 8a7cada52cc738e1aba94fcba0c16c20284b2bf1 Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Sat, 28 Sep 2013 23:21:02 +0100 Subject: [PATCH] call to ldap_unbind is necessary to free memory even when ldap_bind failed. --- src/auth/ldap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/auth/ldap.c b/src/auth/ldap.c index c1e98c4..f78780f 100644 --- a/src/auth/ldap.c +++ b/src/auth/ldap.c @@ -105,8 +105,9 @@ authLdapAuthenticate(void * _this, Credential cred) NULL, &ldap_servcred); + ldap_unbind_ext_s(this->ldap, NULL, NULL); + if (0 == ldap_err) { - ldap_unbind_ext_s(this->ldap, NULL, NULL); //! \todo here we need to get and return the user id return TRUE; }