builtin/credential-store: fix leaking credential
We never free credentials read by the credential store, leading to a memory leak. Plug it. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
11d6a81c01
commit
1d615afa8d
|
|
@ -218,5 +218,6 @@ int cmd_credential_store(int argc, const char **argv, const char *prefix)
|
|||
; /* Ignore unknown operation. */
|
||||
|
||||
string_list_clear(&fns, 0);
|
||||
credential_clear(&c);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description='credential-store tests'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
. "$TEST_DIRECTORY"/lib-credential.sh
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ you can set GIT_TEST_CREDENTIAL_HELPER_SETUP to a sequence of shell
|
|||
commands.
|
||||
'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
. "$TEST_DIRECTORY"/lib-credential.sh
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue