summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_async_connection.c
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2010-10-22 11:53:51 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-10-22 07:21:49 -0400
commit59cc610d3a4885c5d37185b9adad39168feb6b55 (patch)
treef49a7949acf04a5e823ecf2de11e46f1fc500826 /src/providers/ldap/sdap_async_connection.c
parent4534c103b193b74452ea81bf12ffaceb1901728a (diff)
downloadsssd-59cc610d3a4885c5d37185b9adad39168feb6b55.tar.gz
sssd-59cc610d3a4885c5d37185b9adad39168feb6b55.tar.xz
sssd-59cc610d3a4885c5d37185b9adad39168feb6b55.zip
Add some missing ldap_memfree()
Diffstat (limited to 'src/providers/ldap/sdap_async_connection.c')
-rw-r--r--src/providers/ldap/sdap_async_connection.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c
index e4ca96242..f73f34e1c 100644
--- a/src/providers/ldap/sdap_async_connection.c
+++ b/src/providers/ldap/sdap_async_connection.c
@@ -238,7 +238,7 @@ static void sdap_connect_done(struct sdap_op *op,
struct tevent_req *req = talloc_get_type(pvt, struct tevent_req);
struct sdap_connect_state *state = tevent_req_data(req,
struct sdap_connect_state);
- char *errmsg;
+ char *errmsg = NULL;
char *tlserr;
int ret;
int optret;
@@ -260,6 +260,7 @@ static void sdap_connect_done(struct sdap_op *op,
DEBUG(3, ("START TLS result: %s(%d), %s\n",
ldap_err2string(state->result), state->result, errmsg));
+ ldap_memfree(errmsg);
if (ldap_tls_inplace(state->sh->ldap)) {
DEBUG(9, ("SSL/TLS handler already in place.\n"));
@@ -420,7 +421,7 @@ static void simple_bind_done(struct sdap_op *op,
struct tevent_req *req = talloc_get_type(pvt, struct tevent_req);
struct simple_bind_state *state = tevent_req_data(req,
struct simple_bind_state);
- char *errmsg;
+ char *errmsg = NULL;
int ret;
LDAPControl **response_controls;
int c;
@@ -502,6 +503,7 @@ static void simple_bind_done(struct sdap_op *op,
ret = LDAP_SUCCESS;
done:
ldap_controls_free(response_controls);
+ ldap_memfree(errmsg);
if (ret == LDAP_SUCCESS) {
tevent_req_done(req);