aboutsummaryrefslogtreecommitdiff
path: root/builtin/repack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-09-16 14:03:30 -0700
committerJunio C Hamano <gitster@pobox.com>2024-09-16 14:03:30 -0700
commita2b7f03e65ca8c0a5b6d1cbc42866db3df96aeed (patch)
tree41f6b591d2c3e8eb62f9e23d15bc09a7e66ca957 /builtin/repack.c
parented155187b429a2a6b6475efe1767053df37ccfe1 (diff)
parent46f6ca2a68e02dd68132ed0b64cd55a8b6569e29 (diff)
downloadgit-a2b7f03e65ca8c0a5b6d1cbc42866db3df96aeed.tar.xz
Merge branch 'ps/leakfixes-part-6' into ps/leakfixes-part-7
* ps/leakfixes-part-6: (22 commits) builtin/repack: fix leaking keep-pack list merge-ort: fix two leaks when handling directory rename modifications match-trees: fix leaking prefixes in `shift_tree()` builtin/fmt-merge-msg: fix leaking buffers builtin/grep: fix leaking object context builtin/pack-objects: plug leaking list of keep-packs builtin/repack: fix leaking line buffer when packing promisors negotiator/skipping: fix leaking commit entries shallow: fix leaking members of `struct shallow_info` shallow: free grafts when unregistering them object: clear grafts when clearing parsed object pool gpg-interface: fix misdesigned signing key interfaces send-pack: fix leaking push cert nonce remote: fix leak in reachability check of a remote-tracking ref remote: fix leaking tracking refs builtin/submodule--helper: fix leaking refs on push-check submodule: fix leaking fetch task data upload-pack: fix leaking child process data on reachability checks builtin/push: fix leaking refspec query result send-pack: fix leaking common object IDs ...
Diffstat (limited to 'builtin/repack.c')
-rw-r--r--builtin/repack.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/repack.c b/builtin/repack.c
index 8bb875532b..3ee8cfa732 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -425,9 +425,11 @@ static void repack_promisor_objects(const struct pack_objects_args *args,
free(promisor_name);
}
+
fclose(out);
if (finish_command(&cmd))
die(_("could not finish pack-objects to repack promisor objects"));
+ strbuf_release(&line);
}
struct pack_geometry {
@@ -1541,6 +1543,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
}
cleanup:
+ string_list_clear(&keep_pack_list, 0);
string_list_clear(&names, 1);
existing_packs_release(&existing);
free_pack_geometry(&geometry);