Commit 9b3fc895b724bbdd5a698c8e7dc9ae6551f0a83d

Carlos Martín Nieto 2016-03-03T11:17:36

tests: plug a leak

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/tests/refs/create.c b/tests/refs/create.c
index a0bc780..b96d0c9 100644
--- a/tests/refs/create.c
+++ b/tests/refs/create.c
@@ -133,6 +133,7 @@ void test_refs_create__oid_unknown_succeeds_by_default(void)
 
 	/* Create and write the new object id reference */
 	cl_git_pass(git_reference_create(&new_reference, g_repo, new_head, &id, 0, NULL));
+	git_reference_free(new_reference);
 
 	/* Ensure the reference can't be looked-up... */
 	cl_git_pass(git_reference_lookup(&looked_up_ref, g_repo, new_head));