diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-11-25 15:24:53 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-25 15:24:53 -0800 |
commit | ca065523c617fad68a4d85a971bbbe69125d93c1 (patch) | |
tree | d5935aa8e537677b2ac17fc09a153d7dccc2dba9 /diff-lib.c | |
parent | 2ba70a330be354aab60f1db6f8b6670d707dd615 (diff) | |
parent | d44e5267eaefb27521e4ed2655358b0282add239 (diff) | |
download | git-ca065523c617fad68a4d85a971bbbe69125d93c1.tar.gz |
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.c | 2 |
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; } |