Skip to content

Commit

Permalink
validation BUGFIX handle empty tree
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed May 27, 2024
1 parent eea767a commit 506fab4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/validation.c
Original file line number Diff line number Diff line change
Expand Up @@ -1924,7 +1924,7 @@ lyd_validate_module_final(struct lyd_node *tree, const struct lys_module *module
uint32_t i = 0;

LY_CHECK_ARG_RET(NULL, module, !(val_opts & (LYD_VALIDATE_PRESENT | LYD_VALIDATE_NOT_FINAL)), LY_EINVAL);
LY_CHECK_CTX_EQUAL_RET(LYD_CTX(tree), module->ctx, LY_EINVAL);
LY_CHECK_CTX_EQUAL_RET(tree ? LYD_CTX(tree) : NULL, module->ctx, LY_EINVAL);

/* module is unchanged but we need to get the first module data node */
mod = lyd_mod_next_module(tree, module, module->ctx, &i, &first);
Expand Down

0 comments on commit 506fab4

Please sign in to comment.