schema tree BUGFIX internal mods freeing
We actually need to free the internal mods
too if the whole context gets destroyed,
a flag introduced for this.
diff --git a/src/parser_yin.c b/src/parser_yin.c
index 83400ba..95af1a2 100644
--- a/src/parser_yin.c
+++ b/src/parser_yin.c
@@ -4822,7 +4822,7 @@
error:
/* cleanup */
lyxml_free_elem(module->ctx, yin);
- lys_submodule_free(submodule);
+ lys_submodule_free(submodule, 0);
return NULL;
}
@@ -4889,7 +4889,7 @@
/* both have the same revision -> we already have the same module */
/* so free the new one and update the old one's implement flag if needed */
lyxml_free_elem(ctx, yin);
- lys_free(module);
+ lys_free(module, 0);
unres->count = 0;
LOGVRB("module %s already in context", ctx->models.list[i]->name);
@@ -4923,7 +4923,7 @@
error:
/* cleanup */
lyxml_free_elem(ctx, yin);
- lys_free(module);
+ lys_free(module, 0);
return NULL;
}