mirror of
https://github.com/moparisthebest/curl
synced 2024-12-23 08:38:49 -05:00
ngtcp2+gnutls: clear credentials when freed
... to avoid double-free. Reported-by: Kenneth Davidson Fixes #6824 Closes #6856
This commit is contained in:
parent
4b4401e26a
commit
33ddef3617
@ -873,8 +873,10 @@ static void qs_disconnect(struct quicsocket *qs)
|
||||
#endif
|
||||
qs->ssl = NULL;
|
||||
#ifdef USE_GNUTLS
|
||||
if(qs->cred)
|
||||
if(qs->cred) {
|
||||
gnutls_certificate_free_credentials(qs->cred);
|
||||
qs->cred = NULL;
|
||||
}
|
||||
#endif
|
||||
for(i = 0; i < 3; i++)
|
||||
Curl_safefree(qs->crypto_data[i].buf);
|
||||
|
Loading…
Reference in New Issue
Block a user