Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-03-04 21:32:09 +0300
committerJunio C Hamano <gitster@pobox.com>2022-03-05 00:24:18 +0300
commitbf67dd8d9a29d02e44c622f62762a1cfc58fb3bb (patch)
tree862f7e4a3b1145511a49d95535afc1a05ef3abd0 /builtin/bundle.c
parentb07fa8f1b2004fa7ea7091ba453be894bddfeb3a (diff)
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>
Diffstat (limited to 'builtin/bundle.c')
-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;
}