diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-09-19 10:47:57 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-09-19 10:47:57 +0900 |
commit | d811ba1897b723fd0146875201061e3603c16391 (patch) | |
tree | 23594d07bf59cdd03c9e979c09f720ad1fee9fb0 /diff.c | |
parent | 17cb5f85d06e82b7837a59064fd5fe61b44f9d12 (diff) | |
parent | b6ec3071774fb4eab406e76c29cbf1a5f27929a8 (diff) | |
download | git-d811ba1897b723fd0146875201061e3603c16391.tar.gz |
Merge branch 'rs/strbuf-leakfix'
Many leaks of strbuf have been fixed.
* rs/strbuf-leakfix: (34 commits)
wt-status: release strbuf after use in wt_longstatus_print_tracking()
wt-status: release strbuf after use in read_rebase_todolist()
vcs-svn: release strbuf after use in end_revision()
utf8: release strbuf on error return in strbuf_utf8_replace()
userdiff: release strbuf after use in userdiff_get_textconv()
transport-helper: release strbuf after use in process_connect_service()
sequencer: release strbuf after use in save_head()
shortlog: release strbuf after use in insert_one_record()
sha1_file: release strbuf on error return in index_path()
send-pack: release strbuf on error return in send_pack()
remote: release strbuf after use in set_url()
remote: release strbuf after use in migrate_file()
remote: release strbuf after use in read_remote_branches()
refs: release strbuf on error return in write_pseudoref()
notes: release strbuf after use in notes_copy_from_stdin()
merge: release strbuf after use in write_merge_heads()
merge: release strbuf after use in save_state()
mailinfo: release strbuf on error return in handle_boundary()
mailinfo: release strbuf after use in handle_from()
help: release strbuf on error return in exec_woman_emacs()
...
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2583,6 +2583,7 @@ static void show_stats(struct diffstat_t *data, struct diff_options *options) } print_stat_summary_inserts_deletes(options, total_files, adds, dels); + strbuf_release(&out); } static void show_shortstats(struct diffstat_t *data, struct diff_options *options) @@ -5288,6 +5289,7 @@ static void show_rename_copy(struct diff_options *opt, const char *renamecopy, emit_diff_symbol(opt, DIFF_SYMBOL_SUMMARY, sb.buf, sb.len, 0); show_mode_change(opt, p, 0); + strbuf_release(&sb); } static void diff_summary(struct diff_options *opt, struct diff_filepair *p) @@ -5313,6 +5315,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; |