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:
Diffstat (limited to 'tests-clar/refs/crashes.c')
-rw-r--r--tests-clar/refs/crashes.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests-clar/refs/crashes.c b/tests-clar/refs/crashes.c
index e1b289ace..5a1885a7a 100644
--- a/tests-clar/refs/crashes.c
+++ b/tests-clar/refs/crashes.c
@@ -7,11 +7,14 @@ void test_refs_crashes__double_free(void)
const char *REFNAME = "refs/heads/xxx";
cl_git_pass(git_repository_open(&repo, cl_fixture("testrepo.git")));
- cl_git_pass(git_reference_create_symbolic(&ref, repo, REFNAME, "refs/heads/master", 0));
+ cl_git_pass(git_reference_symbolic_create(&ref, repo, REFNAME, "refs/heads/master", 0));
cl_git_pass(git_reference_lookup(&ref2, repo, REFNAME));
cl_git_pass(git_reference_delete(ref));
+ git_reference_free(ref);
+ git_reference_free(ref2);
+
/* reference is gone from disk, so reloading it will fail */
- cl_git_fail(git_reference_reload(ref2));
+ cl_git_fail(git_reference_lookup(&ref2, repo, REFNAME));
git_repository_free(repo);
}