Skip to content

Commit bf67dd8

Browse files
avargitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b07fa8f commit bf67dd8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

builtin/bundle.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ static int cmd_bundle_create(int argc, const char **argv, const char *prefix) {
9393
if (!startup_info->have_repository)
9494
die(_("Need a repository to create a bundle."));
9595
ret = !!create_bundle(the_repository, bundle_file, argc, argv, &pack_opts, version);
96+
strvec_clear(&pack_opts);
9697
free(bundle_file);
9798
return ret;
9899
}

0 commit comments

Comments
 (0)