diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-08-08 09:35:51 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-08 09:22:21 -0700 |
commit | 1a7e5efdb06a7e3087bf9068220b011f006db43f (patch) | |
tree | c7967a04fc9219ce2c4e0b1a57ee16262b99a01e /builtin/commit.c | |
parent | c369fc46d079447d216f7ef309ff60abe493cdb6 (diff) |
submodule: fix leaking fetch tasks
When done with a fetch task used for parallel fetches of submodules, we
need to both call `fetch_task_release()` to release the task's contents
and `free()` to release the task itself. Most sites do this already, but
some only call `fetch_task_release()` and thus leak memory.
While we could trivially fix this by adding the two missing calls to
free(3P), the result would be that we always call both functions. Let's
thus refactor the code such that `fetch_task_release()` also frees the
structure itself. Rename it to `fetch_task_free()` accordingly.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions