diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-08-22 11:18:08 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-22 09:18:06 -0700 |
commit | 7720460ccf8d5a8fcc5cf37bad97b26d799a5644 (patch) | |
tree | 91d1cd657be3981ace5e338bafa3a690a931487a /gitweb/static/js/lib/common-lib.js | |
parent | c92abe71dfa154d62dc36f1bc7b6c00184c5dbda (diff) |
transport: fix leaking arguments when fetching from bundle
In `fetch_refs_from_bundle()` we assemble a vector of arguments to pass
to `unbundle()`, but never free it. And in theory we wouldn't have to
because `unbundle()` already knows to free the vector for us. But it
fails to do so when it exits early due to `verify_bundle()` failing.
The calling convention that the arguments are freed by the callee and
not the caller feels somewhat weird. Refactor the code such that it is
instead the responsibility of the caller to free the vector, adapting
the only two callsites where we pass extra arguments. This also fixes
the memory leak.
This memory leak gets hit in t5510, but fixing it isn't sufficient to
make the whole test suite pass.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/static/js/lib/common-lib.js')
0 files changed, 0 insertions, 0 deletions