From f0f0003cebc71fd3c45ce3acd32eabbfe1af520b Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Sep 16 2019 08:40:56 +0000 Subject: IFP: Fix talloc hierarchy for members of struct ifp_list_domains_state The function talloc_steal was called ifp_list_domains_recv *_paths = talloc_steal(mem_ctx, state->paths) But talloc hierarchy for entries in the list state->paths was not correct therefore memory was freed together with the state. Merges: https://pagure.io/SSSD/sssd/pull-request/4082 Reviewed-by: Alexey Tikhonov --- diff --git a/src/responder/ifp/ifp_domains.c b/src/responder/ifp/ifp_domains.c index 2020b75..16d80e6 100644 --- a/src/responder/ifp/ifp_domains.c +++ b/src/responder/ifp/ifp_domains.c @@ -136,7 +136,7 @@ static void ifp_list_domains_done(struct tevent_req *subreq) for (dom = state->ifp_ctx->rctx->domains; dom != NULL; dom = get_next_domain(dom, SSS_GND_DESCEND)) { - state->paths[pi] = sbus_opath_compose(state, IFP_PATH_DOMAINS, dom->name); + state->paths[pi] = sbus_opath_compose(state->paths, IFP_PATH_DOMAINS, dom->name); if (state->paths[pi] == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "Could not create path for dom %s\n", dom->name);