commit | 08e9b11c531566a041af19276aa3c8f845ba4e40 | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Fri Jun 11 15:41:17 2021 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Fri Jun 11 15:41:17 2021 +0200 |
tree | 1b3e857c95fdf7fe78cf5a214fc1396a6d538af7 | |
parent | cc0c1484fc1992fc8dc791fd72a38d9d2a6824a7 [diff] [blame] |
libyang BUGFIX avoid invalid parameters for memmove and memcpy
diff --git a/src/parser_json.c b/src/parser_json.c index b0eeab0..cf8e8df 100644 --- a/src/parser_json.c +++ b/src/parser_json.c
@@ -850,7 +850,7 @@ { if (*node_p) { /* insert, keep first pointer correct */ - lyd_insert_node(&parent->node, first_p, *node_p); + lyd_insert_node(parent ? &parent->node : NULL, first_p, *node_p); if (first_p) { if (parent) { *first_p = parent->child;