commit | 1849d4ef81efb020652544057cfb319015052500 | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Wed Jul 03 14:03:59 2024 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Wed Jul 03 14:03:59 2024 +0200 |
tree | bfae19dbb0da25da5abdc41b0fec9e5c280f1554 | |
parent | ae893eff9150b39e361f0017c2c8e75de5ef1be2 [diff] |
tree data BUGFIX prevent creating invalid trees
diff --git a/src/tree_data.c b/src/tree_data.c index dede407..e1463ea 100644 --- a/src/tree_data.c +++ b/src/tree_data.c
@@ -1078,7 +1078,7 @@ { struct lyd_node *first_sibling; - LY_CHECK_ARG_RET(NULL, node, LY_EINVAL); + LY_CHECK_ARG_RET(NULL, node, sibling != node, LY_EINVAL); if (sibling) { LY_CHECK_RET(lyd_insert_check_schema(NULL, sibling->schema, node->schema));