summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2014-09-09 10:45:40 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-09-10 18:23:48 +0200
commit4113389146cde7034bec7980a7fdf0d50f4c7bf7 (patch)
treee9cea1747596003a5ef233099a2a9ec895dbd11c
parent01ef12a42a730f36bcbb24441bbb6b7aca179f9f (diff)
downloadsssd-4113389146cde7034bec7980a7fdf0d50f4c7bf7.tar.gz
sssd-4113389146cde7034bec7980a7fdf0d50f4c7bf7.tar.xz
sssd-4113389146cde7034bec7980a7fdf0d50f4c7bf7.zip
LDAP: Always free talloc_req
On failure, the subreq wasn't freed, which was not a big deal given the parent request would free the subreq anyway, but it's better to follow the usual pattern. Reviewed-by: Simo Sorce <simo@redhat.com>
-rw-r--r--src/providers/ldap/sdap_access.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_access.c b/src/providers/ldap/sdap_access.c
index dda60fc28..e09e6b8fe 100644
--- a/src/providers/ldap/sdap_access.c
+++ b/src/providers/ldap/sdap_access.c
@@ -1461,14 +1461,13 @@ static void sdap_access_lock_get_lockout_done(struct tevent_req *subreq)
state = tevent_req_data(req, struct sdap_access_lock_req_ctx);
ret = sdap_get_generic_recv(subreq, state, &num_results, &results);
+ talloc_zfree(subreq);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE, "Cannot retrieve ppolicy\n");
ret = ERR_NETWORK_IO;
goto done;
}
- talloc_zfree(subreq);
-
/* Check the number of responses we got
* If it's exactly 1, we passed the check
* If it's < 1, we failed the check