From cdf4599ba44a6b17818cb5e77f3a727491b7e85e Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 10 Apr 2012 15:24:33 +0200 Subject: Free controls in sdap_rebind_proc --- src/providers/ldap/sdap_async_connection.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/providers/ldap/sdap_async_connection.c') 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; } -- cgit