Skip to content

Commit e86acad

Browse files
committed
tree schema REFACTOR always set out params
1 parent 9f2c705 commit e86acad

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/tree_schema.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,6 +1550,8 @@ lys_parse_submodule(struct ly_ctx *ctx, struct ly_in *in, LYS_INFORMAT format, s
15501550

15511551
LY_CHECK_ARG_RET(ctx, ctx, in, LY_EINVAL);
15521552

1553+
*submodule = NULL;
1554+
15531555
switch (format) {
15541556
case LYS_IN_YIN:
15551557
rc = yin_parse_submodule(&yinctx, ctx, main_ctx, in, &submod);

src/tree_schema_common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,8 @@ lys_parse_localfile(struct ly_ctx *ctx, const char *name, const char *revision,
713713
LY_ERR ret = LY_SUCCESS;
714714
struct lysp_load_module_data mod_data = {0};
715715

716+
*result = NULL;
717+
716718
LY_CHECK_RET(lys_search_localfile(ly_ctx_get_searchdirs(ctx), !(ctx->flags & LY_CTX_DISABLE_SEARCHDIR_CWD), name,
717719
revision, &filepath, &format));
718720
if (!filepath) {
@@ -1210,7 +1212,6 @@ lysp_load_submodules(struct lysp_ctx *pctx, struct lysp_module *pmod, struct ly_
12101212
continue;
12111213
}
12121214

1213-
submod = NULL;
12141215
submod_included = 1;
12151216
if (pmod->is_submod) {
12161217
/* try to find the submodule in the main module or its submodules */

0 commit comments

Comments
 (0)