Skip to content

Commit 0f490d2

Browse files
blanetgitster
authored andcommitted
ls-remote: leakfix for not clearing server_options
Ensure `server_options` is properly cleared using `string_list_clear()` in `builtin/ls-remote.c:cmd_ls_remote`. Although we cannot yet enable `TEST_PASSES_SANITIZE_LEAK=true` for `t/t5702-protocol-v2.sh` due to other existing leaks, this fix ensures that "git-ls-remote" related server options tests pass the sanitize leak check: ... ok 12 - server-options are sent when using ls-remote ok 13 - server-options from configuration are used by ls-remote ... Signed-off-by: Xing Xin <[email protected]> Reviewed-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 148bc7b commit 0f490d2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

builtin/ls-remote.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,5 +173,6 @@ int cmd_ls_remote(int argc,
173173
transport_ls_refs_options_release(&transport_options);
174174

175175
strvec_clear(&pattern);
176+
string_list_clear(&server_options, 0);
176177
return status;
177178
}

0 commit comments

Comments
 (0)