summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2022-03-04 19:32:09 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-03-04 13:24:18 -0800
commitbf67dd8d9a29d02e44c622f62762a1cfc58fb3bb (patch)
tree862f7e4a3b1145511a49d95535afc1a05ef3abd0
parentremote-curl.c: free memory in cmd_main() (diff)
downloadtgif-bf67dd8d9a29d02e44c622f62762a1cfc58fb3bb.tar.xz
bundle: call strvec_clear() on allocated strvec
Fixing this small memory leak in cmd_bundle_create() gets "t5607-clone-bundle.sh" closer to passing under SANITIZE=leak. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/bundle.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/bundle.c b/builtin/bundle.c
index 5a85d7cd0f..2adad545a2 100644
--- a/builtin/bundle.c
+++ b/builtin/bundle.c
@@ -93,6 +93,7 @@ static int cmd_bundle_create(int argc, const char **argv, const char *prefix) {
if (!startup_info->have_repository)
die(_("Need a repository to create a bundle."));
ret = !!create_bundle(the_repository, bundle_file, argc, argv, &pack_opts, version);
+ strvec_clear(&pack_opts);
free(bundle_file);
return ret;
}