Skip to content

Commit 5aa1f12

Browse files
committed
tests: refs::create: fix memory leak
1 parent cf8e9a3 commit 5aa1f12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/refs/create.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ void test_refs_create__symbolic_with_arbitrary_content(void)
9292
cl_assert(git_reference_type(looked_up_ref) & GIT_REF_SYMBOLIC);
9393
cl_assert(reference_is_packed(looked_up_ref) == 0);
9494
cl_assert_equal_s(looked_up_ref->name, new_head_tracker);
95+
git_reference_free(looked_up_ref);
9596

9697
/* Ensure the target is what we expect it to be */
9798
cl_assert_equal_s(git_reference_symbolic_target(new_reference), arbitrary_target);
@@ -111,7 +112,6 @@ void test_refs_create__symbolic_with_arbitrary_content(void)
111112
git_repository_free(repo2);
112113
git_reference_free(new_reference);
113114
git_reference_free(looked_up_ref);
114-
115115
}
116116

117117
void test_refs_create__deep_symbolic(void)

0 commit comments

Comments
 (0)