Commit 74e50a2d3e53e52ede430dca4ebc5efb2a38de4e

nulltoken 2011-03-30T22:46:52

Fix memory leak in tag releated tests

diff --git a/tests/t08-tag.c b/tests/t08-tag.c
index 371f862..a5bdee3 100644
--- a/tests/t08-tag.c
+++ b/tests/t08-tag.c
@@ -58,6 +58,9 @@ BEGIN_TEST(read0, "read and parse a tag from the repository")
 
 	must_be_true(git_oid_cmp(&id_commit, git_commit_id(commit)) == 0);
 
+	git_tag_close(tag1);
+	git_tag_close(tag2);
+	git_commit_close(commit);
 	git_repository_free(repo);
 END_TEST
 
@@ -111,6 +114,7 @@ BEGIN_TEST(write0, "write a tag to the repository and read it again")
 
 	must_pass(remove_loose_object(REPOSITORY_FOLDER, (git_object *)tag));
 
+	git_tag_close(tag);
 	git_repository_free(repo);
 
 END_TEST
@@ -152,6 +156,7 @@ BEGIN_TEST(write1, "write a tag to the repository which points to an unknown oid
 	must_pass(git_reference_delete(ref_tag));
 	must_pass(remove_loose_object(REPOSITORY_FOLDER, (git_object *)tag));
 
+	git_tag_close(tag);
 	git_repository_free(repo);
 
 END_TEST