diff options
Diffstat (limited to 'tests/refs/crashes.c')
-rw-r--r-- | tests/refs/crashes.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/tests/refs/crashes.c b/tests/refs/crashes.c deleted file mode 100644 index 228f479a0..000000000 --- a/tests/refs/crashes.c +++ /dev/null @@ -1,20 +0,0 @@ -#include "clar_libgit2.h" - -void test_refs_crashes__double_free(void) -{ - git_repository *repo; - git_reference *ref, *ref2; - const char *REFNAME = "refs/heads/xxx"; - - repo = cl_git_sandbox_init("testrepo.git"); - cl_git_pass(git_reference_symbolic_create(&ref, repo, REFNAME, "refs/heads/master", 0, NULL)); - 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_lookup(&ref2, repo, REFNAME)); - - cl_git_sandbox_cleanup(); -} |