Commit 2c1bc36d56e3d07feb098bd805beb7078acdd5ae

Carlos Martín Nieto 2016-03-29T14:47:31

Plug a few leaks

diff --git a/src/tree.c b/src/tree.c
index c1bd459..6ce460c 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -837,6 +837,8 @@ int git_treebuilder_write(git_oid *oid, git_treebuilder *bld)
 		error = git_odb_write(oid, odb, tree.ptr, tree.size, GIT_OBJ_TREE);
 
 	git_buf_free(&tree);
+	git_vector_free(&entries);
+
 	return error;
 }
 
diff --git a/tests/core/array.c b/tests/core/array.c
index 375cc8d..8e626a5 100644
--- a/tests/core/array.c
+++ b/tests/core/array.c
@@ -51,5 +51,7 @@ void test_core_array__bsearch2(void)
 	expect_pos(50, 10, GIT_ENOTFOUND);
 	expect_pos(68, 10, GIT_ENOTFOUND);
 	expect_pos(256, 12, GIT_OK);
+
+	git_array_clear(integers);
 }