diff options
Diffstat (limited to 'src/diff.c')
-rw-r--r-- | src/diff.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/diff.c b/src/diff.c index 89b3b77f3..1f3ee63be 100644 --- a/src/diff.c +++ b/src/diff.c @@ -1234,7 +1234,7 @@ int git_diff_tree_to_workdir( assert(diff && repo); - if ((error = git_repository_index(&index, repo))) + if ((error = git_repository_index__weakptr(&index, repo))) return error; DIFF_FROM_ITERATORS( @@ -1243,7 +1243,6 @@ int git_diff_tree_to_workdir( &b, repo, index, old_tree, GIT_ITERATOR_DONT_AUTOEXPAND, pfx, pfx) ); - git_index_free(index); return error; } |