From 528b513fce820272608155ae7e8d00ef5288301c Mon Sep 17 00:00:00 2001 From: Pavel Březina Date: Tue, 22 Oct 2013 16:15:16 +0200 Subject: subdomains: first destroy ptask then remove sdom be_ptask_destroy was unreachable since sdom is not present in the list of sdap domains any more. --- src/providers/ipa/ipa_subdomains.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/providers/ipa') diff --git a/src/providers/ipa/ipa_subdomains.c b/src/providers/ipa/ipa_subdomains.c index d6cb0c6b6..49ac0b3e7 100644 --- a/src/providers/ipa/ipa_subdomains.c +++ b/src/providers/ipa/ipa_subdomains.c @@ -291,12 +291,12 @@ ipa_ad_subdom_remove(struct ipa_subdomains_ctx *ctx, return; } - sdap_domain_remove(iter->ad_id_ctx->sdap_id_ctx->opts, subdom); - DLIST_REMOVE(ctx->id_ctx->server_mode->trusts, iter); - sdom = sdap_domain_get(iter->ad_id_ctx->sdap_id_ctx->opts, subdom); if (sdom == NULL) return; be_ptask_destroy(&sdom->enum_task); + + sdap_domain_remove(iter->ad_id_ctx->sdap_id_ctx->opts, subdom); + DLIST_REMOVE(ctx->id_ctx->server_mode->trusts, iter); } const char *get_flat_name_from_subdomain_name(struct be_ctx *be_ctx, -- cgit