Commit 25100d6d by Etienne Samson

tests: free the worktree in add_with_explicit_branch

Valgrind log:

==2711== 305 (48 direct, 257 indirect) bytes in 1 blocks are definitely lost in loss record 576 of 624
==2711==    at 0x4C2CC70: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==2711==    by 0x5E079E: git__calloc (util.h:99)
==2711==    by 0x5E0D21: open_worktree_dir (worktree.c:134)
==2711==    by 0x5E0F23: git_worktree_lookup (worktree.c:176)
==2711==    by 0x5E1972: git_worktree_add (worktree.c:388)
==2711==    by 0x551F23: test_worktree_worktree__add_with_explicit_branch (worktree.c:292)
==2711==    by 0x45853E: clar_run_test (clar.c:222)
==2711==    by 0x4587E1: clar_run_suite (clar.c:286)
==2711==    by 0x458B04: clar_parse_args (clar.c:362)
==2711==    by 0x458CAB: clar_test_run (clar.c:428)
==2711==    by 0x45665C: main (main.c:24)
parent 592b200c
......@@ -300,6 +300,7 @@ void test_worktree_worktree__add_with_explicit_branch(void)
git_reference_free(branch);
git_reference_free(wthead);
git_repository_free(wtrepo);
git_worktree_free(wt);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment