Commit e3298a330835af8d4760bf593500c28728398747

Patrick Steinhardt 2016-10-28T12:30:39

Merge pull request #3973 from pks-t/pks/memleak-fixes Trivial memory leak fixes in test suite

diff --git a/tests/core/vector.c b/tests/core/vector.c
index 336254c..c2e5d3f 100644
--- a/tests/core/vector.c
+++ b/tests/core/vector.c
@@ -404,4 +404,6 @@ void test_core_vector__reverse(void)
 
 	for (i = 0; i < 5; i++)
 		cl_assert_equal_p(out2[i], git_vector_get(&v, i));
+
+	git_vector_free(&v);
 }
diff --git a/tests/online/fetchhead.c b/tests/online/fetchhead.c
index 9aaad25..c1ac06d 100644
--- a/tests/online/fetchhead.c
+++ b/tests/online/fetchhead.c
@@ -126,6 +126,8 @@ void test_online_fetchhead__explicit_dst_refspec_creates_branch(void)
 
 	cl_git_pass(git_branch_lookup(&ref, g_repo, "explicit-refspec", GIT_BRANCH_ALL));
 	cl_assert_equal_i(refs + 1, count_references());
+
+	git_reference_free(ref);
 }
 
 void test_online_fetchhead__empty_dst_refspec_creates_no_branch(void)