Commit 91d46f8d by Carlos Martín Nieto

clay tests: free resources

Trees, indices and repos need to be freed
parent 671bbdd3
......@@ -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);
......
......@@ -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);
}
......
......@@ -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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment