mirror of
https://github.com/git/git.git
synced 2024-11-24 02:17:02 +08:00
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>
This commit is contained in:
parent
b07fa8f1b2
commit
bf67dd8d9a
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user