builtin/ls-remote: plug leaking server options
The list of server options populated via `OPT_STRING_LIST()` is never cleared, causing a memory leak. Plug it. This leak is exposed by t5702, but plugging it alone does not make the whole test suite pass. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
34b6ce9b30
commit
5f5dd8e297
@ -166,6 +166,7 @@ int cmd_ls_remote(int argc,
|
||||
status = 0; /* we found something */
|
||||
}
|
||||
|
||||
string_list_clear(&server_options, 0);
|
||||
ref_sorting_release(sorting);
|
||||
ref_array_clear(&ref_array);
|
||||
if (transport_disconnect(transport))
|
||||
|
Reference in New Issue
Block a user