@@ -1091,15 +1091,15 @@ ly_path_compile_deref(const struct ly_ctx *ctx, const struct lysc_node *ctx_node
10911091 }
10921092 lref = (const struct lysc_type_leafref * )deref_leaf_node -> type ;
10931093 LY_CHECK_GOTO (ret = ly_path_append (ctx , path2 , path ), cleanup );
1094- ly_path_free (ctx , path2 );
1094+ ly_path_free (path2 );
10951095 path2 = NULL ;
10961096
10971097 /* compile dereferenced leafref expression and append it to the path */
10981098 LY_CHECK_GOTO (ret = ly_path_compile_leafref (ctx , node2 , top_ext , lref -> path , oper , target , format , prefix_data ,
10991099 & path2 ), cleanup );
11001100 node2 = path2 [LY_ARRAY_COUNT (path2 ) - 1 ].node ;
11011101 LY_CHECK_GOTO (ret = ly_path_append (ctx , path2 , path ), cleanup );
1102- ly_path_free (ctx , path2 );
1102+ ly_path_free (path2 );
11031103 path2 = NULL ;
11041104
11051105 /* properly parsed path must always continue with ')' and '/' */
@@ -1123,9 +1123,9 @@ ly_path_compile_deref(const struct ly_ctx *ctx, const struct lysc_node *ctx_node
11231123 LY_CHECK_GOTO (ret = ly_path_append (ctx , path2 , path ), cleanup );
11241124
11251125cleanup :
1126- ly_path_free (ctx , path2 );
1126+ ly_path_free (path2 );
11271127 if (ret ) {
1128- ly_path_free (ctx , * path );
1128+ ly_path_free (* path );
11291129 * path = NULL ;
11301130 }
11311131 return ret ;
@@ -1281,7 +1281,7 @@ _ly_path_compile(const struct ly_ctx *ctx, const struct lys_module *cur_mod, con
12811281
12821282cleanup :
12831283 if (ret ) {
1284- ly_path_free (ctx , * path );
1284+ ly_path_free (* path );
12851285 * path = NULL ;
12861286 }
12871287 LOG_LOCBACK (cur_node ? 1 : 0 , 0 );
@@ -1486,7 +1486,7 @@ ly_path_predicates_free(const struct ly_ctx *ctx, struct ly_path_predicate *pred
14861486}
14871487
14881488void
1489- ly_path_free (const struct ly_ctx * ctx , struct ly_path * path )
1489+ ly_path_free (struct ly_path * path )
14901490{
14911491 LY_ARRAY_COUNT_TYPE u ;
14921492
@@ -1495,7 +1495,7 @@ ly_path_free(const struct ly_ctx *ctx, struct ly_path *path)
14951495 }
14961496
14971497 LY_ARRAY_FOR (path , u ) {
1498- ly_path_predicates_free (ctx , path [u ].predicates );
1498+ ly_path_predicates_free (path [ u ]. node -> module -> ctx , path [u ].predicates );
14991499 }
15001500 LY_ARRAY_FREE (path );
15011501}
0 commit comments