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