summaryrefslogtreecommitdiff
path: root/credential.c
diff options
context:
space:
mode:
Diffstat (limited to 'credential.c')
-rw-r--r--credential.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/credential.c b/credential.c
index e5202fbef2..000ac7a8d4 100644
--- a/credential.c
+++ b/credential.c
@@ -10,8 +10,8 @@
void credential_init(struct credential *c)
{
- memset(c, 0, sizeof(*c));
- c->helpers.strdup_strings = 1;
+ struct credential blank = CREDENTIAL_INIT;
+ memcpy(c, &blank, sizeof(*c));
}
void credential_clear(struct credential *c)
@@ -128,6 +128,7 @@ static void credential_apply_config(struct credential *c)
normalized_url = url_normalize(url.buf, &config.url);
git_config(urlmatch_config_entry, &config);
+ string_list_clear(&config.vars, 1);
free(normalized_url);
strbuf_release(&url);