diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a756b74..97d41926 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ Developers may need to change their code ### Corrected Busg +* Fixed: Double top-levels in xmldb_get that could occur with xpath containing choice. * Fixed: [RESTCONF exit on cert error + complex accept](https://github.com/clicon/clixon/issues/551) * Fixed: [Deletion of leaf in YANG choice removes leaf in a different choice/case](https://github.com/clicon/clixon/issues/542) * Fixed: Deviated types were resolved in target context, not lexically in deviation context diff --git a/lib/src/clixon_datastore_read.c b/lib/src/clixon_datastore_read.c index 03641f79..0f02ff4c 100644 --- a/lib/src/clixon_datastore_read.c +++ b/lib/src/clixon_datastore_read.c @@ -140,8 +140,12 @@ singleconfigroot(cxobj *xt, /*! Recurse up from x0 up to x0t then create objects from x1t down to new object x1 * + * @param[in] x0t Orig top-level + * @param[in] x0 Orig node (go up from this until = x0t) + * @param[in] x1t New tree on entry + * @param[out] x1pp * @retval 0 OK - * @retval -1 OK + * @retval -1 Error */ static int xml_copy_bottom_recurse(cxobj *x0t, @@ -211,6 +215,8 @@ xml_copy_bottom_recurse(cxobj *x0t, } } + if (xml_sort(x1p) < 0) + goto done; } *x1pp = x1; x1 = NULL;