summaryrefslogtreecommitdiff
path: root/tests/iterator
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-03-30 17:47:05 -0400
committerEdward Thomson <ethomson@github.com>2016-03-31 10:41:33 -0400
commit17442b28f9ba2dfa0fb596fe66c3a35847a8f606 (patch)
treeb8d26bdd55a482f30b1fba7767152654f0488637 /tests/iterator
parent9705483342c281d719f97bf4e99d91938116418a (diff)
downloadlibgit2-17442b28f9ba2dfa0fb596fe66c3a35847a8f606.tar.gz
leaks: fix some leaks in the tests
Diffstat (limited to 'tests/iterator')
-rw-r--r--tests/iterator/index.c2
-rw-r--r--tests/iterator/tree.c4
-rw-r--r--tests/iterator/workdir.c2
3 files changed, 8 insertions, 0 deletions
diff --git a/tests/iterator/index.c b/tests/iterator/index.c
index 64e7b14ba..b609d5990 100644
--- a/tests/iterator/index.c
+++ b/tests/iterator/index.c
@@ -970,7 +970,9 @@ void test_iterator_index__pathlist_with_directory(void)
cl_git_pass(git_iterator_for_index(&i, g_repo, index, &i_opts));
expect_iterator_items(i, 4, NULL, 4, NULL);
git_iterator_free(i);
+
git_index_free(index);
+ git_tree_free(tree);
git_vector_free(&filelist);
}
diff --git a/tests/iterator/tree.c b/tests/iterator/tree.c
index b4d0f40f3..07da58371 100644
--- a/tests/iterator/tree.c
+++ b/tests/iterator/tree.c
@@ -1020,6 +1020,7 @@ void test_iterator_tree__pathlist_with_directory(void)
expect_iterator_items(i, expected_len2, expected2, expected_len2, expected2);
git_iterator_free(i);
+ git_tree_free(tree);
git_vector_free(&filelist);
}
@@ -1048,6 +1049,7 @@ void test_iterator_tree__pathlist_with_directory_include_tree_nodes(void)
expect_iterator_items(i, expected_len, expected, expected_len, expected);
git_iterator_free(i);
+ git_tree_free(tree);
git_vector_free(&filelist);
}
@@ -1070,7 +1072,9 @@ void test_iterator_tree__pathlist_no_match(void)
cl_git_pass(git_iterator_for_tree(&i, tree, &i_opts));
cl_assert_equal_i(GIT_ITEROVER, git_iterator_current(&entry, i));
+ git_iterator_free(i);
+ git_tree_free(tree);
git_vector_free(&filelist);
}
diff --git a/tests/iterator/workdir.c b/tests/iterator/workdir.c
index 3abaee65c..fc7771c20 100644
--- a/tests/iterator/workdir.c
+++ b/tests/iterator/workdir.c
@@ -1030,6 +1030,8 @@ static void create_paths(const char *root, int depth)
create_paths(fullpath.ptr, (depth - 1));
}
}
+
+ git_buf_free(&fullpath);
}
void test_iterator_workdir__pathlist_for_deeply_nested_item(void)