summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-04-10 15:24:33 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-04-20 10:55:14 -0400
commitcdf4599ba44a6b17818cb5e77f3a727491b7e85e (patch)
treeeaaae6dcc2aa93a0e875068a73f947b7de8e74ef
parent51773686d354b82081830444c048706d83d43d65 (diff)
downloadsssd-cdf4599ba44a6b17818cb5e77f3a727491b7e85e.tar.gz
sssd-cdf4599ba44a6b17818cb5e77f3a727491b7e85e.tar.xz
sssd-cdf4599ba44a6b17818cb5e77f3a727491b7e85e.zip
Free controls in sdap_rebind_proc
-rw-r--r--src/providers/ldap/sdap_async_connection.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c
index 1f50c1983..fac078c33 100644
--- a/src/providers/ldap/sdap_async_connection.c
+++ b/src/providers/ldap/sdap_async_connection.c
@@ -1747,7 +1747,8 @@ static int sdap_rebind_proc(LDAP *ldap, LDAP_CONST char *url, ber_tag_t request,
SDAP_DEFAULT_AUTHTOK),
&password);
if (ret != EOK) {
- DEBUG(1, ("sdap_auth_get_authtok failed.\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ ("sdap_auth_get_authtok failed.\n"));
ret = LDAP_LOCAL_ERROR;
goto done;
}
@@ -1756,8 +1757,9 @@ static int sdap_rebind_proc(LDAP *ldap, LDAP_CONST char *url, ber_tag_t request,
ret = ldap_sasl_bind_s(ldap, user_dn, LDAP_SASL_SIMPLE, &password,
request_controls, NULL, NULL);
if (ret != LDAP_SUCCESS) {
- DEBUG(1, ("ldap_sasl_bind_s failed (%d)[%s]\n", ret,
- sss_ldap_err2string(ret)));
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ ("ldap_sasl_bind_s failed (%d)[%s]\n", ret,
+ sss_ldap_err2string(ret)));
}
} else {
sasl_bind_state = talloc_zero(tmp_ctx, struct sasl_bind_state);
@@ -1783,7 +1785,7 @@ static int sdap_rebind_proc(LDAP *ldap, LDAP_CONST char *url, ber_tag_t request,
(ret == LDAP_SUCCESS ? "Successfully" : "Failed to"), url));
done:
+ if (ctrls[0]) ldap_control_free(ctrls[0]);
talloc_free(tmp_ctx);
-
return ret;
}