path UPDATE context not required for freeing
diff --git a/src/tree_schema.c b/src/tree_schema.c
index d7ac8d8..81bda1b 100644
--- a/src/tree_schema.c
+++ b/src/tree_schema.c
@@ -644,7 +644,7 @@
     ret = lys_find_lypath_atoms(p, set);
 
 cleanup:
-    ly_path_free(ctx, p);
+    ly_path_free(p);
     lyxp_expr_free(ctx, expr);
     return ret;
 }
@@ -679,7 +679,7 @@
     snode = p[LY_ARRAY_COUNT(p) - 1].node;
 
 cleanup:
-    ly_path_free(ctx, p);
+    ly_path_free(p);
     lyxp_expr_free(ctx, expr);
     return snode;
 }