commit | fa25769e6956338cebf79c865c43e63ce6e428b8 | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Tue May 28 10:45:39 2024 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Tue May 28 10:45:39 2024 +0200 |
tree | 4b8b357bd333713bf4dde52b1ba6cdb163aaffc6 | |
parent | c7ef855975fbbb4dda5ad9d58a8ff4e1b797e512 [diff] |
parser json BUGFIX check for parameter validity Fixes #2246
diff --git a/src/parser_json.c b/src/parser_json.c index 55f0ed9..4a94d03 100644 --- a/src/parser_json.c +++ b/src/parser_json.c
@@ -1193,7 +1193,7 @@ /* parse as an attribute to a (opaque) node */ if (!attr_node) { /* try to find the instance */ - LY_LIST_FOR(*first_p, attr_node) { + LY_LIST_FOR(parent ? lyd_child(parent) : *first_p, attr_node) { if (snode) { if (attr_node->schema) { if (attr_node->schema == snode) {