mirror of
https://github.com/git/git.git
synced 2024-05-06 15:46:41 +02:00
Merge branch 'rs/plug-diff-cache-leak'
Memleak fix. * rs/plug-diff-cache-leak: diff-lib: plug minor memory leaks in do_diff_cache()
This commit is contained in:
commit
ca065523c6
|
@ -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);
|
repo_init_revisions(opt->repo, &revs, NULL);
|
||||||
copy_pathspec(&revs.prune_data, &opt->pathspec);
|
copy_pathspec(&revs.prune_data, &opt->pathspec);
|
||||||
|
diff_setup_done(&revs.diffopt);
|
||||||
revs.diffopt = *opt;
|
revs.diffopt = *opt;
|
||||||
|
|
||||||
if (diff_cache(&revs, tree_oid, NULL, 1))
|
if (diff_cache(&revs, tree_oid, NULL, 1))
|
||||||
exit(128);
|
exit(128);
|
||||||
|
clear_pathspec(&revs.prune_data);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue