Skip to content

Commit

Permalink
validation BUGFIX avoid using uninitialized vars
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed Nov 28, 2024
1 parent 45a9897 commit b90865b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/validation.c
Original file line number Diff line number Diff line change
Expand Up @@ -2216,10 +2216,6 @@ _lyd_validate_op(struct lyd_node *op_tree, struct lyd_node *op_node, const struc
ext_val_p = &ext_val;
}

/* create the getnext hash table for this module */
rc = lyd_val_getnext_ht_new(&getnext_ht);
LY_CHECK_GOTO(rc, cleanup);

/* merge op_tree into dep_tree */
lyd_val_op_merge_find(op_tree, op_node, dep_tree, &op_subtree, &tree_sibling, &tree_parent);
op_sibling_before = op_subtree->prev->next ? op_subtree->prev : NULL;
Expand All @@ -2232,6 +2228,10 @@ _lyd_validate_op(struct lyd_node *op_tree, struct lyd_node *op_node, const struc
dep_tree = tree_sibling;
}

/* create the getnext hash table for this module */
rc = lyd_val_getnext_ht_new(&getnext_ht);
LY_CHECK_GOTO(rc, cleanup);

if (int_opts & LYD_INTOPT_REPLY) {
if (validate_subtree) {
/* add output children defaults */
Expand Down

0 comments on commit b90865b

Please sign in to comment.