Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 86e8853

Browse files
committed
tests: index: do not re-allocate index
Plug a memory leak caused by re-allocating a `git_index` structure which has already been allocated by the test suite's initializer.
1 parent ace0d36 commit 86e8853

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

tests/index/collision.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ void test_index_collision__add_with_highstage_2(void)
7979
{
8080
git_index_entry entry;
8181

82-
cl_git_pass(git_repository_index(&g_index, g_repo));
83-
8482
memset(&entry, 0, sizeof(entry));
8583
entry.ctime.seconds = 12346789;
8684
entry.mtime.seconds = 12346789;

0 commit comments

Comments
 (0)