diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-26 19:31:39 +0300 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-26 19:31:39 +0300 |
commit | 9568660f626e314651d550ed8a06ac17e750a02d (patch) | |
tree | cbbde77724713f62c7f61014d8a1e6d8f7b7e617 /tests/diff | |
parent | 354268ca488fc89346d5874b446510f0cc89c007 (diff) |
diff: fix leaks in diff printing
Diffstat (limited to 'tests/diff')
-rw-r--r-- | tests/diff/binary.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/diff/binary.c b/tests/diff/binary.c index 6a5f3907b..3a5716800 100644 --- a/tests/diff/binary.c +++ b/tests/diff/binary.c @@ -4,6 +4,7 @@ #include "buffer.h" #include "filebuf.h" +#include "repository.h" static git_repository *repo; @@ -497,7 +498,7 @@ void test_diff_binary__blob_to_blob(void) opts.id_abbrev = GIT_OID_HEXSZ; repo = cl_git_sandbox_init("renames"); - cl_git_pass(git_repository_index(&index, repo)); + cl_git_pass(git_repository_index__weakptr(&index, repo)); cl_git_append2file("renames/untimely.txt", "Oh that crazy Kipling!\r\n"); cl_git_pass(git_index_add_bypath(index, "untimely.txt")); @@ -532,4 +533,7 @@ void test_diff_binary__blob_to_blob(void) git__free(diff_data.old_path); git__free(diff_data.new_path); + + git_buf_free(&diff_data.old_binary_base85); + git_buf_free(&diff_data.new_binary_base85); } |