@@ -162,7 +162,7 @@ setup(void **state)
162162static int
163163teardown_ctx (void * * UNUSED (state ))
164164{
165- lys_module_free (PARSER_CUR_PMOD (YCTX )-> mod );
165+ lys_module_free (PARSER_CUR_PMOD (YCTX )-> mod , 0 );
166166 yin_parser_ctx_free (YCTX );
167167 YCTX = NULL ;
168168
@@ -3428,7 +3428,7 @@ mod_renew(struct lys_yin_parser_ctx *ctx)
34283428 struct ly_ctx * ly_ctx = PARSER_CUR_PMOD (ctx )-> mod -> ctx ;
34293429 struct lysp_module * pmod ;
34303430
3431- lys_module_free (PARSER_CUR_PMOD (ctx )-> mod );
3431+ lys_module_free (PARSER_CUR_PMOD (ctx )-> mod , 0 );
34323432 pmod = calloc (1 , sizeof * pmod );
34333433 ctx -> parsed_mods -> objs [0 ] = pmod ;
34343434 pmod -> mod = calloc (1 , sizeof * pmod -> mod );
@@ -3558,7 +3558,7 @@ submod_renew(struct lys_yin_parser_ctx *ctx, const char *belongs_to)
35583558 struct ly_ctx * ly_ctx = PARSER_CUR_PMOD (ctx )-> mod -> ctx ;
35593559 struct lysp_submodule * submod ;
35603560
3561- lys_module_free (PARSER_CUR_PMOD (ctx )-> mod );
3561+ lys_module_free (PARSER_CUR_PMOD (ctx )-> mod , 0 );
35623562 submod = calloc (1 , sizeof * submod );
35633563 ctx -> parsed_mods -> objs [0 ] = submod ;
35643564 submod -> mod = calloc (1 , sizeof * submod -> mod );
@@ -3717,7 +3717,7 @@ test_yin_parse_module(void **state)
37173717 assert_int_equal (yin_parse_module (& yin_ctx , in , mod ), LY_SUCCESS );
37183718 assert_null (mod -> parsed -> exts -> child -> next -> child );
37193719 assert_string_equal (mod -> parsed -> exts -> child -> next -> arg , "test" );
3720- lys_module_free (mod );
3720+ lys_module_free (mod , 0 );
37213721 yin_parser_ctx_free (yin_ctx );
37223722 ly_in_free (in , 0 );
37233723 mod = NULL ;
@@ -3755,7 +3755,7 @@ test_yin_parse_module(void **state)
37553755 "</module>\n" ;
37563756 assert_int_equal (ly_in_new_memory (data , & in ), LY_SUCCESS );
37573757 assert_int_equal (yin_parse_module (& yin_ctx , in , mod ), LY_SUCCESS );
3758- lys_module_free (mod );
3758+ lys_module_free (mod , 0 );
37593759 yin_parser_ctx_free (yin_ctx );
37603760 ly_in_free (in , 0 );
37613761 mod = NULL ;
@@ -3770,7 +3770,7 @@ test_yin_parse_module(void **state)
37703770 "</module>\n" ;
37713771 assert_int_equal (ly_in_new_memory (data , & in ), LY_SUCCESS );
37723772 assert_int_equal (yin_parse_module (& yin_ctx , in , mod ), LY_SUCCESS );
3773- lys_module_free (mod );
3773+ lys_module_free (mod , 0 );
37743774 yin_parser_ctx_free (yin_ctx );
37753775 ly_in_free (in , 0 );
37763776 mod = NULL ;
@@ -3783,7 +3783,7 @@ test_yin_parse_module(void **state)
37833783 assert_int_equal (ly_in_new_memory (data , & in ), LY_SUCCESS );
37843784 assert_int_equal (yin_parse_module (& yin_ctx , in , mod ), LY_EINVAL );
37853785 CHECK_LOG_CTX ("Input data contains submodule which cannot be parsed directly without its main module." , NULL );
3786- lys_module_free (mod );
3786+ lys_module_free (mod , 0 );
37873787 yin_parser_ctx_free (yin_ctx );
37883788 ly_in_free (in , 0 );
37893789
@@ -3798,7 +3798,7 @@ test_yin_parse_module(void **state)
37983798 assert_int_equal (ly_in_new_memory (data , & in ), LY_SUCCESS );
37993799 assert_int_equal (yin_parse_module (& yin_ctx , in , mod ), LY_EVALID );
38003800 CHECK_LOG_CTX ("Trailing garbage \"<module>\" after module, expected end-of-input." , "Line number 6." );
3801- lys_module_free (mod );
3801+ lys_module_free (mod , 0 );
38023802 yin_parser_ctx_free (yin_ctx );
38033803 ly_in_free (in , 0 );
38043804 mod = NULL ;
0 commit comments