clay tests: free resources Trees, indices and repos need to be freed
diff --git a/tests-clay/index/read_tree.c b/tests-clay/index/read_tree.c
index b3f4a66..09a1d94 100644
--- a/tests-clay/index/read_tree.c
+++ b/tests-clay/index/read_tree.c
@@ -34,6 +34,7 @@ void test_index_read_tree__read_write_involution(void)
/* read-tree */
git_tree_lookup(&tree, repo, &expected);
cl_git_pass(git_index_read_tree(index, tree));
+ git_tree_free(tree);
cl_git_pass(git_tree_create_fromindex(&tree_oid, index));
cl_assert(git_oid_cmp(&expected, &tree_oid) == 0);
diff --git a/tests-clay/object/tree/diff.c b/tests-clay/object/tree/diff.c
index b2c7f69..315e0fa 100644
--- a/tests-clay/object/tree/diff.c
+++ b/tests-clay/object/tree/diff.c
@@ -45,6 +45,7 @@ void test_object_tree_diff__cleanup(void)
{
git_tree_free(atree);
git_tree_free(btree);
+ git_index_free(theindex);
git_repository_free(repo);
}
diff --git a/tests-clay/refs/crashes.c b/tests-clay/refs/crashes.c
index 51eb15d..339d4f8 100644
--- a/tests-clay/refs/crashes.c
+++ b/tests-clay/refs/crashes.c
@@ -12,4 +12,6 @@ void test_refs_crashes__double_free(void)
cl_git_pass(git_reference_delete(ref));
/* reference is gone from disk, so reloading it will fail */
cl_must_fail(git_reference_reload(ref2));
+
+ git_repository_free(repo);
}