summaryrefslogtreecommitdiff
path: root/src/providers/ldap
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
parent4534c103b193b74452ea81bf12ffaceb1901728a (diff)
downloadsssd-59cc610d3a4885c5d37185b9adad39168feb6b55.tar.gz
sssd-59cc610d3a4885c5d37185b9adad39168feb6b55.tar.bz2
sssd-59cc610d3a4885c5d37185b9adad39168feb6b55.zip
Add some missing ldap_memfree()
Diffstat (limited to 'src/providers/ldap')
-rw-r--r--src/providers/ldap/sdap_async.c3
-rw-r--r--src/providers/ldap/sdap_async_connection.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/src/providers/ldap/sdap_async.c b/src/providers/ldap/sdap_async.c
index 7fc04a64..84da288a 100644
--- a/src/providers/ldap/sdap_async.c
+++ b/src/providers/ldap/sdap_async.c
@@ -863,7 +863,7 @@ static void sdap_get_generic_done(struct sdap_op *op,
struct sdap_get_generic_state *state = tevent_req_data(req,
struct sdap_get_generic_state);
struct sysdb_attrs *attrs;
- char *errmsg;
+ char *errmsg = NULL;
int result;
int ret;
@@ -917,6 +917,7 @@ static void sdap_get_generic_done(struct sdap_op *op,
DEBUG(2, ("Unexpected result from ldap: %s(%d), %s\n",
ldap_err2string(result), result, errmsg));
}
+ ldap_memfree(errmsg);
tevent_req_done(req);
return;
diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c
index e4ca9624..f73f34e1 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);