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 /send-pack.c | |
parent | Merge branch 'jk/shortlog-ident-cleanup' (diff) | |
parent | wt-status: release strbuf after use in wt_longstatus_print_tracking() (diff) | |
download | tgif-d811ba1897b723fd0146875201061e3603c16391.tar.xz |
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 'send-pack.c')
-rw-r--r-- | send-pack.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/send-pack.c b/send-pack.c index 11d6f3d983..b865f662e4 100644 --- a/send-pack.c +++ b/send-pack.c @@ -492,8 +492,11 @@ int send_pack(struct send_pack_args *args, * we were to send it and we're trying to send the refs * atomically, abort the whole operation. */ - if (use_atomic) + if (use_atomic) { + strbuf_release(&req_buf); + strbuf_release(&cap_buf); return atomic_push_failure(args, remote_refs, ref); + } /* Fallthrough for non atomic case. */ default: continue; |