Skip to content

Commit

Permalink
tree data new BUGFIX check value arg
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed Nov 16, 2023
1 parent 6d30f92 commit 3fc15ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tree_data_new.c
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ lyd_new_any(struct lyd_node *parent, const struct lys_module *module, const char
struct lysc_ext_instance *ext = NULL;
const struct ly_ctx *ctx = parent ? LYD_CTX(parent) : (module ? module->ctx : NULL);

LY_CHECK_ARG_RET(ctx, parent || module, parent || node, name, LY_EINVAL);
LY_CHECK_ARG_RET(ctx, parent || module, parent || node, name, (value_type == LYD_ANYDATA_DATATREE) || value, LY_EINVAL);
LY_CHECK_CTX_EQUAL_RET(parent ? LYD_CTX(parent) : NULL, module ? module->ctx : NULL, LY_EINVAL);

if (!module) {
Expand Down

0 comments on commit 3fc15ea

Please sign in to comment.