diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-09-03 18:14:59 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-09-03 18:15:00 +0200 |
commit | 8c1c63d5256edd900200b7f056a946f38c89495d (patch) | |
tree | 5a894009e6419ca2ba29ba2031067b457f8bfaba /transport.c | |
parent | Merge branch 'cl/config-regexp-docfix' (diff) | |
parent | transport: fix leaking negotiation tips (diff) | |
download | git-8c1c63d5256edd900200b7f056a946f38c89495d.tar.xz git-8c1c63d5256edd900200b7f056a946f38c89495d.zip |
Merge branch 'ps/leakfixes-part-5'
Even more leak fixes.
* ps/leakfixes-part-5:
transport: fix leaking negotiation tips
transport: fix leaking arguments when fetching from bundle
builtin/fetch: fix leaking transaction with `--atomic`
remote: fix leaking peer ref when expanding refmap
remote: fix leaks when matching refspecs
remote: fix leaking config strings
builtin/fetch-pack: fix leaking refs
sideband: fix leaks when configuring sideband colors
builtin/send-pack: fix leaking refspecs
transport: fix leaking OID arrays in git:// transport data
t/helper: fix leaking multi-pack-indices in "read-midx"
builtin/repack: fix leaks when computing packs to repack
midx-write: fix leaking hashfile on error cases
builtin/archive: fix leaking `OPT_FILENAME()` value
builtin/upload-archive: fix leaking args passed to `write_archive()`
builtin/merge-tree: fix leaking `-X` strategy options
pretty: fix leaking key/value separator buffer
pretty: fix memory leaks when parsing pretty formats
convert: fix leaks when resetting attributes
mailinfo: fix leaking header data
Diffstat (limited to 'transport.c')
-rw-r--r-- | transport.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/transport.c b/transport.c index bab28965f9..3c4714581f 100644 --- a/transport.c +++ b/transport.c @@ -189,6 +189,8 @@ static int fetch_refs_from_bundle(struct transport *transport, &extra_index_pack_args, fetch_pack_fsck_objects() ? VERIFY_BUNDLE_FSCK : 0); transport->hash_algo = data->header.hash_algo; + + strvec_clear(&extra_index_pack_args); return ret; } @@ -945,7 +947,13 @@ static int disconnect_git(struct transport *transport) finish_connect(data->conn); } + if (data->options.negotiation_tips) { + oid_array_clear(data->options.negotiation_tips); + free(data->options.negotiation_tips); + } list_objects_filter_release(&data->options.filter_options); + oid_array_clear(&data->extra_have); + oid_array_clear(&data->shallow); free(data); return 0; } |