summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--range-diff.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/range-diff.c b/range-diff.c
index e9479794b4..a315c4c889 100644
--- a/range-diff.c
+++ b/range-diff.c
@@ -485,6 +485,7 @@ static void output(struct string_list *a, struct string_list *b,
else
diff_setup(&opts);
+ opts.no_free = 1;
if (!opts.output_format)
opts.output_format = DIFF_FORMAT_PATCH;
opts.flags.suppress_diff_headers = 1;
@@ -545,6 +546,8 @@ static void output(struct string_list *a, struct string_list *b,
strbuf_release(&buf);
strbuf_release(&dashes);
strbuf_release(&indent);
+ opts.no_free = 0;
+ diff_free(&opts);
}
int show_range_diff(const char *range1, const char *range2,