Skip to content

Commit b90865b

Browse files
committed
validation BUGFIX avoid using uninitialized vars
1 parent 45a9897 commit b90865b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/validation.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2216,10 +2216,6 @@ _lyd_validate_op(struct lyd_node *op_tree, struct lyd_node *op_node, const struc
22162216
ext_val_p = &ext_val;
22172217
}
22182218

2219-
/* create the getnext hash table for this module */
2220-
rc = lyd_val_getnext_ht_new(&getnext_ht);
2221-
LY_CHECK_GOTO(rc, cleanup);
2222-
22232219
/* merge op_tree into dep_tree */
22242220
lyd_val_op_merge_find(op_tree, op_node, dep_tree, &op_subtree, &tree_sibling, &tree_parent);
22252221
op_sibling_before = op_subtree->prev->next ? op_subtree->prev : NULL;
@@ -2232,6 +2228,10 @@ _lyd_validate_op(struct lyd_node *op_tree, struct lyd_node *op_node, const struc
22322228
dep_tree = tree_sibling;
22332229
}
22342230

2231+
/* create the getnext hash table for this module */
2232+
rc = lyd_val_getnext_ht_new(&getnext_ht);
2233+
LY_CHECK_GOTO(rc, cleanup);
2234+
22352235
if (int_opts & LYD_INTOPT_REPLY) {
22362236
if (validate_subtree) {
22372237
/* add output children defaults */

0 commit comments

Comments
 (0)