From 66177cbab545374ccc0bcacdd7a8ffea1ca7be6d Mon Sep 17 00:00:00 2001 From: Thierry Bordaz Date: Tue, 12 Jul 2016 11:43:28 +0200 Subject: [PATCH 05/17] Double free on ldap entry during priming During Schema-compat cache priming, If it exists an associated domain the entry returned by the internal search is freed twice. This was introduced in order for slapi-nis to resolve IPA groups with fully qualified suffix. To support SSSD 1.14+ change of logic to handle a default domain suffix. --- src/back-sch.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/back-sch.c b/src/back-sch.c index cdd2b3c..0745329 100644 --- a/src/back-sch.c +++ b/src/back-sch.c @@ -284,15 +284,13 @@ backend_set_config_read_config(struct plugin_state *state, Slapi_Entry *e, slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &result); if (result == 0) { slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries); - slapi_pblock_set(pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, NULL); for (j=0; entries[j] != NULL; j++) { ret.associated_domain = slapi_entry_attr_get_charptr(entries[j], "associatedDomain"); - slapi_entry_free(entries[i]); if (ret.associated_domain != NULL) break; } - slapi_ch_free((void**)entries); } + slapi_free_search_results_internal(pb); } slapi_pblock_destroy(pb); pb = NULL; -- 2.13.6