[Freeipa-devel] [PATCHES 0172-0176] ipa_range_check improvements

Alexander Bokovoy abokovoy at redhat.com
Thu Apr 17 12:45:52 UTC 2014


On Thu, 17 Apr 2014, Tomas Babej wrote:
>>From 632c0ed1fca2cb48b981f6daac55badd59c9c263 Mon Sep 17 00:00:00 2001
>From: Tomas Babej <tbabej at redhat.com>
>Date: Wed, 16 Apr 2014 17:22:46 +0200
>Subject: [PATCH] ipa_range_check: Make a new copy of forest_root_id attribute
> for range_info struct
>
>Not making a new copy of this attribute creates multiple frees caused by multiple
>pointers to the same forest_root_id from all the range_info structs for all the
>domains belonging to given forest.
>
>Part of: https://fedorahosted.org/freeipa/ticket/4137
>---
> daemons/ipa-slapi-plugins/ipa-range-check/ipa_range_check.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/daemons/ipa-slapi-plugins/ipa-range-check/ipa_range_check.c b/daemons/ipa-slapi-plugins/ipa-range-check/ipa_range_check.c
>index 20961d8810448a46514ab82c8cdc318e014db4fc..e2affbd47dc54fb6180cffe842dc2395cf482f52 100644
>--- a/daemons/ipa-slapi-plugins/ipa-range-check/ipa_range_check.c
>+++ b/daemons/ipa-slapi-plugins/ipa-range-check/ipa_range_check.c
>@@ -147,7 +147,7 @@ static char* get_forest_root_id(struct domain_info *head, char* domain_id) {
>     if (domain_id != NULL) {
>         while(head) {
>             if (strcasecmp(head->domain_id, domain_id) == 0) {
>-                return head->forest_root_id;
>+                return slapi_ch_strdup(head->forest_root_id);
>             }
>             head = head->next;
>         }
ACK

-- 
/ Alexander Bokovoy




More information about the Freeipa-devel mailing list