fix(resolver): delete the cursor of the OCaml structure walk

ocaml_collect_structure created a tree cursor and had no ts_tree_cursor_delete at all. Its one exit after the cursor is the fall-through at the end of the loop, so every struct of every OCaml file leaked one. LeakSanitizer on Linux reported it at adapter_ocaml.c:603 from resolver_source_langs. The other three cursors in the file are already paired.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This commit is contained in:
Martin Vogel committed 2026-11-02 21:22:44 +01:00
1 parent 448ffa0e93
commit 76aaffbebc
1 file changed
+1
+1
View File
@@ -664,6 +664,7 @@ static void ocaml_collect_structure(cbm_source_walk_t *walk, const char *owner,
}
}
}
ts_tree_cursor_delete(&cursor);
}
/* Where this file stands among the modules of its build. */