Skip to content

Commit

Permalink
tree data BUGFIX check return value (#2183)
Browse files Browse the repository at this point in the history
This patch fixes segfault in case of usage of anydata nodes and
LY_CTX_BUILTIN_PLUGINS_ONLY within sorted data tree.
  • Loading branch information
steweg authored and michalvasko committed Feb 26, 2024
1 parent f8c0b58 commit 5dd11b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tree_data_sorted.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ lyds_insert(struct lyd_node **first_sibling, struct lyd_node **leader, struct ly
/* get the Red-black tree from the @p leader */
rbt = lyds_get_rb_tree(*leader, &root_meta);
if (!root_meta) {
lyds_create_metadata(*leader, &root_meta);
LY_CHECK_RET(lyds_create_metadata(*leader, &root_meta));
}
if (!rbt) {
/* Due to optimization, the Red-black tree has not been created so far, so it will be
Expand Down

0 comments on commit 5dd11b8

Please sign in to comment.