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

Added NULL checks to zone tree.

parent 45a5303d
No related branches found
No related tags found
No related merge requests found
......@@ -315,7 +315,7 @@ int knot_zone_tree_remove(knot_zone_tree_t *tree,
const knot_dname_t *owner,
knot_zone_tree_node_t **removed)
{
if (tree == NULL || owner == NULL) {
if (tree == NULL || owner == NULL || removed == NULL) {
return KNOT_EBADARG;
}
......@@ -429,6 +429,9 @@ int knot_zone_tree_reverse_apply_postorder(knot_zone_tree_t *tree,
int knot_zone_tree_shallow_copy(knot_zone_tree_t *from,
knot_zone_tree_t *to)
{
if (to == NULL || from == NULL) {
return KNOT_EBADARG;
}
/*
* This function will copy the tree by hand, so that the nodes
* do not have to be inserted the normal way. It should be substantially
......
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