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>
This commit is contained in:
Rene Scharfe 2017-08-30 19:49:41 +02:00 committed by Junio C Hamano
parent f31f1d3951
commit fa842d843d

1
diff.c
View File

@ -5314,6 +5314,7 @@ static void diff_summary(struct diff_options *opt, struct diff_filepair *p)
strbuf_addf(&sb, " (%d%%)\n", similarity_index(p));
emit_diff_symbol(opt, DIFF_SYMBOL_SUMMARY,
sb.buf, sb.len, 0);
strbuf_release(&sb);
}
show_mode_change(opt, p, !p->score);
break;