mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 06:20:56 +00:00
http: fixed leak when asking for credentials again
t->cred might have been allocated the previous time and needs to be freed before asking caller for credentials again.
This commit is contained in:
parent
3451c871cb
commit
1630981e6b
@ -337,6 +337,10 @@ static int on_headers_complete(http_parser *parser)
|
|||||||
no_callback = 1;
|
no_callback = 1;
|
||||||
} else {
|
} else {
|
||||||
if (allowed_auth_types) {
|
if (allowed_auth_types) {
|
||||||
|
if (t->cred) {
|
||||||
|
t->cred->free(t->cred);
|
||||||
|
t->cred = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
error = t->owner->cred_acquire_cb(&t->cred,
|
error = t->owner->cred_acquire_cb(&t->cred,
|
||||||
t->owner->url,
|
t->owner->url,
|
||||||
|
Loading…
Reference in New Issue
Block a user