summaryrefslogtreecommitdiff
path: root/builtin/multi-pack-index.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2021-10-28 20:25:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-10-28 22:31:51 (GMT)
commite6432e0f1f183595b265b76ca765c612e705c65a (patch)
tree143f39d8cf8ca086885e8ea03493ca66c8c40c0a /builtin/multi-pack-index.c
parent9e39acc94ad42362243811a359c2972049e8c880 (diff)
downloadgit-e6432e0f1f183595b265b76ca765c612e705c65a.zip
git-e6432e0f1f183595b265b76ca765c612e705c65a.tar.gz
git-e6432e0f1f183595b265b76ca765c612e705c65a.tar.bz2
builtin/repack.c: avoid leaking child arguments
`git repack` invokes a handful of child processes: one to write the actual pack, and optionally ones to repack promisor objects and update the MIDX. Most of these are freed automatically by calling `start_command()` (which invokes it on error) and `finish_command()` which calls it automatically. But repack_promisor_objects() can initialize a child_process, populate its array of arguments, and then return from the function before even calling start_command(). Make sure that the prepared list of arguments is freed by calling child_process_clear() ourselves to avoid leaking memory along this path. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/multi-pack-index.c')
0 files changed, 0 insertions, 0 deletions