mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-26 00:41:25 -06:00
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>
This commit is contained in:
parent
2c4d41221a
commit
246e722b4f
@ -147,7 +147,7 @@ static char* get_forest_root_id(struct domain_info *head, char* domain_id) {
|
|||||||
if (domain_id != NULL) {
|
if (domain_id != NULL) {
|
||||||
while(head) {
|
while(head) {
|
||||||
if (strcasecmp(head->domain_id, domain_id) == 0) {
|
if (strcasecmp(head->domain_id, domain_id) == 0) {
|
||||||
return head->forest_root_id;
|
return slapi_ch_strdup(head->forest_root_id);
|
||||||
}
|
}
|
||||||
head = head->next;
|
head = head->next;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user