Skip to content

Commit 542ceb4

Browse files
committed
tree data BUGFIX invalid memory access
1 parent 8108afa commit 542ceb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tree_data.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2315,7 +2315,7 @@ lyd_dup(const struct lyd_node *node, const struct ly_ctx *trg_ctx, struct lyd_no
23152315
struct lyd_node *first_dup = NULL; /* the first duplicated node, this is returned */
23162316
struct lyd_node *top = NULL; /* the most higher created node */
23172317
struct lyd_node *local_parent = NULL; /* the direct parent node for the duplicated node(s) */
2318-
struct lyd_node *dup; /* duplicate node */
2318+
struct lyd_node *dup = NULL; /* duplicate node */
23192319
struct lyd_node *first_sibling = NULL; /* first sibling node */
23202320

23212321
assert(node && trg_ctx);

0 commit comments

Comments
 (0)