Skip to content

Commit e3298a3

Browse files
authored
Merge pull request libgit2#3973 from pks-t/pks/memleak-fixes
Trivial memory leak fixes in test suite
2 parents 67dd314 + 30a876c commit e3298a3

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tests/core/vector.c

+2
Original file line numberDiff line numberDiff line change
@@ -404,4 +404,6 @@ void test_core_vector__reverse(void)
404404

405405
for (i = 0; i < 5; i++)
406406
cl_assert_equal_p(out2[i], git_vector_get(&v, i));
407+
408+
git_vector_free(&v);
407409
}

tests/online/fetchhead.c

+2
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ void test_online_fetchhead__explicit_dst_refspec_creates_branch(void)
126126

127127
cl_git_pass(git_branch_lookup(&ref, g_repo, "explicit-refspec", GIT_BRANCH_ALL));
128128
cl_assert_equal_i(refs + 1, count_references());
129+
130+
git_reference_free(ref);
129131
}
130132

131133
void test_online_fetchhead__empty_dst_refspec_creates_no_branch(void)

0 commit comments

Comments
 (0)