fti->version = 1;
fti->count = lfti->count;
- fti->records = talloc_zero_array(mem_ctx,
+ fti->records = talloc_zero_array(fti,
struct ForestTrustInfoRecordArmor,
fti->count);
if (fti->records == NULL) {
lstr = &lftr->forest_trust_data.top_level_name;
str = &ftr->data.name;
- str->string = talloc_strdup(mem_ctx, lstr->string);
+ str->string = talloc_strdup(fti->records, lstr->string);
if (str->string == NULL) {
TALLOC_FREE(fti);
return NT_STATUS_NO_MEMORY;
lstr = &lftr->forest_trust_data.top_level_name_ex;
str = &ftr->data.name;
- str->string = talloc_strdup(mem_ctx, lstr->string);
+ str->string = talloc_strdup(fti->records, lstr->string);
if (str->string == NULL) {
TALLOC_FREE(fti);
return NT_STATUS_NO_MEMORY;
lstr = &linfo->dns_domain_name;
str = &info->dns_name;
- str->string = talloc_strdup(mem_ctx, lstr->string);
+ str->string = talloc_strdup(fti->records, lstr->string);
if (str->string == NULL) {
TALLOC_FREE(fti);
return NT_STATUS_NO_MEMORY;
lstr = &linfo->netbios_domain_name;
str = &info->netbios_name;
- str->string = talloc_strdup(mem_ctx, lstr->string);
+ str->string = talloc_strdup(fti->records, lstr->string);
if (str->string == NULL) {
TALLOC_FREE(fti);
return NT_STATUS_NO_MEMORY;