mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-20 06:05:24 +00:00
tests: plug leaks
This commit is contained in:
parent
96c9b9f0e5
commit
0b3aa7bede
@ -379,6 +379,8 @@ void assert_conflict(
|
|||||||
/* Make HEAD point to this branch */
|
/* Make HEAD point to this branch */
|
||||||
cl_git_pass(git_reference_symbolic_create(
|
cl_git_pass(git_reference_symbolic_create(
|
||||||
&head, g_repo, "HEAD", git_reference_name(branch), 1));
|
&head, g_repo, "HEAD", git_reference_name(branch), 1));
|
||||||
|
git_reference_free(head);
|
||||||
|
git_reference_free(branch);
|
||||||
|
|
||||||
/* Checkout the parent */
|
/* Checkout the parent */
|
||||||
opts.checkout_strategy = GIT_CHECKOUT_FORCE;
|
opts.checkout_strategy = GIT_CHECKOUT_FORCE;
|
||||||
@ -408,6 +410,7 @@ void assert_conflict(
|
|||||||
/* Stage the conflicting change */
|
/* Stage the conflicting change */
|
||||||
cl_git_pass(git_index_add_from_workdir(index, entry_path));
|
cl_git_pass(git_index_add_from_workdir(index, entry_path));
|
||||||
cl_git_pass(git_index_write(index));
|
cl_git_pass(git_index_write(index));
|
||||||
|
git_index_free(index);
|
||||||
|
|
||||||
cl_assert_equal_i(
|
cl_assert_equal_i(
|
||||||
GIT_EMERGECONFLICT, git_checkout_tree(g_repo, g_object, &g_opts));
|
GIT_EMERGECONFLICT, git_checkout_tree(g_repo, g_object, &g_opts));
|
||||||
|
Loading…
Reference in New Issue
Block a user