From: Ævar Arnfjörð Bjarmason Date: Fri, 4 Mar 2022 18:32:09 +0000 (+0100) Subject: bundle: call strvec_clear() on allocated strvec X-Git-Tag: v2.36.0-rc0~72^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bf67dd8d9a29d02e44c622f62762a1cfc58fb3bb;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- 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; }