commit | 0e02e8e6bac490f007649e620f34c800da760732 | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Fri Feb 26 15:01:55 2021 +0100 |
committer | Michal Vasko <mvasko@cesnet.cz> | Fri Feb 26 15:01:55 2021 +0100 |
tree | edfb29ee3b43e3f13df8f4b45787635fafb7e7bb | |
parent | f16e2547548d2a1b5c2917bc48396276361c783c [diff] [blame] |
schema tree BUGFIX always return module on success from parsing If the module was already in the context, it must be returned.
diff --git a/src/tree_schema.c b/src/tree_schema.c index 4470fbe..b64665c 100644 --- a/src/tree_schema.c +++ b/src/tree_schema.c
@@ -1389,7 +1389,13 @@ free_mod_cleanup: lys_module_free(mod, NULL); - mod = NULL; + if (ret) { + mod = NULL; + } else { + /* return the existing module */ + assert(mod_dup); + mod = mod_dup; + } cleanup: if (pctx) {