summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2022-12-01 23:53:17 +0100
committerJunio C Hamano <gitster@pobox.com>2022-12-02 08:25:30 +0900
commit189e97bc4ba8d5f2ab4746d41204feed159fbe9a (patch)
tree21ac76b1ea677686d215abcc3f17bcd58455ad92 /commit.c
parent6c6048fa7f1cf7b9ae79beb0f57fd03dd4021bb4 (diff)
diff: remove parseopts member from struct diff_options
repo_diff_setup() builds the struct option array with git diff's command line options and stores a pointer to it in the parseopts member of struct diff_options. The array is freed by diff_setup_done(), but not by release_revisions(). Thus calling only repo_diff_setup() and release_revisions() leaks that array. We could free it in release_revisions() as well to plug that leak, but there is a better way: Only build it when needed. Absorb prep_parse_options() into the last place that uses the parseopts member of struct diff_options, add_diff_parseopts(), and get rid of said member. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions