Commit 30a876cda6800289d206f823d93aae0d2847a467

Patrick Steinhardt 2016-10-27T11:29:15

tests: fetchhead: fix memory leak

1
2
3
4
5
6
7
8
9
10
11
12
13
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)