summaryrefslogtreecommitdiffstats
path: root/daemons
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2014-04-16 17:22:46 +0200
committerMartin Kosek <mkosek@redhat.com>2014-04-23 13:16:34 +0200
commit246e722b4fb9a3a33c650cf536d2b0f51a1923b7 (patch)
treebc5e166c1dc5995ffb76a5b3230aa7186d5bc5ee /daemons
parent2c4d41221a7208e8e4d53ec85f24fe8a1da711dd (diff)
downloadfreeipa-246e722b4fb9a3a33c650cf536d2b0f51a1923b7.tar.gz
freeipa-246e722b4fb9a3a33c650cf536d2b0f51a1923b7.tar.xz
freeipa-246e722b4fb9a3a33c650cf536d2b0f51a1923b7.zip
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 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Diffstat (limited to 'daemons')
-rw-r--r--daemons/ipa-slapi-plugins/ipa-range-check/ipa_range_check.c2
1 files changed, 1 insertions, 1 deletions
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 fca4819a0..9a51d4196 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;
}