Skip to content

Commit fa842d8

Browse files
rscharfegitster
authored andcommitted
diff: release strbuf after use in diff_summary()
Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent f31f1d3 commit fa842d8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

diff.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5314,6 +5314,7 @@ static void diff_summary(struct diff_options *opt, struct diff_filepair *p)
53145314
strbuf_addf(&sb, " (%d%%)\n", similarity_index(p));
53155315
emit_diff_symbol(opt, DIFF_SYMBOL_SUMMARY,
53165316
sb.buf, sb.len, 0);
5317+
strbuf_release(&sb);
53175318
}
53185319
show_mode_change(opt, p, !p->score);
53195320
break;

0 commit comments

Comments
 (0)