Commit 430866d28cca5e1c04ca5e65dc0f66ae00a2f288

Carlos Martín Nieto 2014-05-20T08:29:51

Fix a leak in the tests

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/tests/odb/foreach.c b/tests/odb/foreach.c
index ab3808b..56daf75 100644
--- a/tests/odb/foreach.c
+++ b/tests/odb/foreach.c
@@ -93,8 +93,8 @@ void test_odb_foreach__files_in_objects_dir(void)
 	cl_git_pass(git_repository_open(&repo, "testrepo.git"));
 
 	cl_git_pass(git_buf_printf(&buf, "%s/objects/somefile", git_repository_path(repo)));
-
 	cl_git_mkfile(buf.ptr, "");
+	git_buf_free(&buf);
 
 	cl_git_pass(git_repository_odb(&odb, repo));
 	cl_git_pass(git_odb_foreach(odb, foreach_cb, &nobj));