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

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-11-26 02:24:53 +0300
committerJunio C Hamano <gitster@pobox.com>2020-11-26 02:24:53 +0300
commitca065523c617fad68a4d85a971bbbe69125d93c1 (patch)
treed5935aa8e537677b2ac17fc09a153d7dccc2dba9 /diff-lib.c
parent2ba70a330be354aab60f1db6f8b6670d707dd615 (diff)
parentd44e5267eaefb27521e4ed2655358b0282add239 (diff)
Merge branch 'rs/plug-diff-cache-leak'
Memleak fix. * rs/plug-diff-cache-leak: diff-lib: plug minor memory leaks in do_diff_cache()
Diffstat (limited to 'diff-lib.c')
-rw-r--r--diff-lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/diff-lib.c b/diff-lib.c
index 082e249fc3..b73cc1859a 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -606,10 +606,12 @@ int do_diff_cache(const struct object_id *tree_oid, struct diff_options *opt)
repo_init_revisions(opt->repo, &revs, NULL);
copy_pathspec(&revs.prune_data, &opt->pathspec);
+ diff_setup_done(&revs.diffopt);
revs.diffopt = *opt;
if (diff_cache(&revs, tree_oid, NULL, 1))
exit(128);
+ clear_pathspec(&revs.prune_data);
return 0;
}