Revert "parser CHANGE do not free submodule on parsing failure"
This reverts commit 46b19edb1121259ebc5685cd76cd68d7249d729f.
diff --git a/src/parser.h b/src/parser.h
index fbe55e4..237877d 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -40,7 +40,7 @@
* @{
*/
struct lys_module *yin_read_module(struct ly_ctx *ctx, const char *data, int implement);
-int yin_read_submodule(struct lys_module *module, const char *data, struct unres_schema *unres, struct lys_submodule **submodule);
+struct lys_submodule *yin_read_submodule(struct lys_module *module, const char *data, struct unres_schema *unres);
/**@} yin */
@@ -70,8 +70,8 @@
LY_IDENT_PREFIX
};
-int lyp_search_file(struct ly_ctx *ctx, struct lys_module *module, const char *name,
- const char *revision, struct unres_schema *unres, struct lys_module **result);
+struct lys_module *lyp_search_file(struct ly_ctx *ctx, struct lys_module *module, const char *name,
+ const char *revision, struct unres_schema *unres);
void lyp_set_implemented(struct lys_module *module);