Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-06-26 19:59:53 +0300
committerCarlos Martín Nieto <cmn@dwim.me>2015-06-26 20:00:33 +0300
commit24fa21f38e15b0c929cafb0c072e47708f18d663 (patch)
tree03213e28bf9fe50d2d93b9091c18a18bbe1dde62 /tests/index
parentafd8a94ee754ff1f1aae20ff9174f1e3c8b9c7fe (diff)
index, iterator, fetchhead: plug leaks
Diffstat (limited to 'tests/index')
-rw-r--r--tests/index/racy.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/index/racy.c b/tests/index/racy.c
index 3a4bc439e..fda1ed239 100644
--- a/tests/index/racy.c
+++ b/tests/index/racy.c
@@ -108,7 +108,7 @@ void test_index_racy__empty_file_after_smudge(void)
const git_index_entry *entry;
/* Make sure we do have a timestamp */
- cl_git_pass(git_repository_index(&index, g_repo));
+ cl_git_pass(git_repository_index__weakptr(&index, g_repo));
cl_git_pass(git_index_write(index));
cl_git_pass(git_buf_joinpath(&path, git_repository_workdir(g_repo), "A"));
@@ -140,4 +140,7 @@ void test_index_racy__empty_file_after_smudge(void)
cl_git_pass(git_diff_index_to_workdir(&diff, g_repo, index, NULL));
cl_assert_equal_i(1, git_diff_num_deltas(diff));
+
+ git_buf_free(&path);
+ git_diff_free(diff);
}