mirror of
https://github.com/git/git
synced 2024-11-05 01:58:18 +00:00
builtin/credential: clear credential before exit
We never release memory associated with `struct credential`. Fix this and mark the corresponding test as leak free. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
49eb597ce0
commit
96c1655095
2 changed files with 4 additions and 0 deletions
|
@ -39,5 +39,7 @@ int cmd_credential(int argc, const char **argv, const char *prefix UNUSED)
|
|||
} else {
|
||||
usage(usage_msg);
|
||||
}
|
||||
|
||||
credential_clear(&c);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description='basic credential helper tests'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
. "$TEST_DIRECTORY"/lib-credential.sh
|
||||
|
||||
|
|
Loading…
Reference in a new issue