Skip to content

Commit b58fa4f

Browse files
committed
tree data BUGFIX param check
1 parent 264ef61 commit b58fa4f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/tree_data.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,6 +1305,10 @@ lyd_unlink_siblings(struct lyd_node *node)
13051305
{
13061306
struct lyd_node *next, *iter, *leader, *start, *first_sibling = NULL;
13071307

1308+
if (!node) {
1309+
return LY_SUCCESS;
1310+
}
1311+
13081312
if (lyds_is_supported(node) && node->prev->next && (node->prev->schema == node->schema)) {
13091313
/* unlink starts at the non-first item in the (leaf-)list */
13101314
lyd_find_sibling_val(node, node->schema, NULL, 0, &leader);

0 commit comments

Comments
 (0)