From 4113389146cde7034bec7980a7fdf0d50f4c7bf7 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 9 Sep 2014 10:45:40 +0200 Subject: 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 --- src/providers/ldap/sdap_access.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/providers/ldap') 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 -- cgit