Skip to content
Snippets Groups Projects
Commit 2707c40b authored by Jan Kadlec's avatar Jan Kadlec
Browse files

new_node: do not copy additional

parent b04eb19c
No related branches found
No related tags found
1 merge request!208Efficient node data storage, libknot refactoring
......@@ -776,19 +776,7 @@ int knot_rrset_copy(const knot_rrset_t *from, knot_rrset_t **to, mm_ctx_t *mm)
return ret;
}
if (from->additional) {
const size_t alloc_size =
knot_rrset_rr_count(from) * sizeof(void *);
(*to)->additional = mm_alloc(mm, alloc_size);
if ((*to)->additional == NULL) {
ERR_ALLOC_FAILED;
knot_rrset_free(to, mm);
return KNOT_ENOMEM;
}
memcpy((*to)->additional, from->additional, alloc_size);
} else {
(*to)->additional = NULL;
}
(*to)->additional = NULL;
return KNOT_EOK;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment