commit | 27fb026ef18545f96584e49ad4d805108e2184b6 | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Tue Feb 23 09:42:01 2021 +0100 |
committer | Michal Vasko <mvasko@cesnet.cz> | Tue Feb 23 09:42:01 2021 +0100 |
tree | 123cffe6637335e6e8eb484d6186f7043c038f3b | |
parent | 5bbcc24fc11df19cce1121f8733d65aca9625b5a [diff] [blame] |
data tree BUGFIX always set context
diff --git a/src/tree_data.c b/src/tree_data.c index d2c1107..ffd3377 100644 --- a/src/tree_data.c +++ b/src/tree_data.c
@@ -449,6 +449,9 @@ uint32_t i, parse_opts, val_opts; LY_CHECK_ARG_RET(ctx, ctx || parent, in, data_type, parent || tree || op, LY_EINVAL); + if (!ctx) { + ctx = LYD_CTX(parent); + } if (tree) { *tree = NULL; }