1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-23 08:38:49 -05:00

ngtcp2: fix happy eyeballs quic connect crash

Reported-by: Peter Wu
Fixes #5565
Closes #5568
This commit is contained in:
Daniel Stenberg 2020-06-15 10:36:32 +02:00
parent 3bf18cdadd
commit b6af4c2336
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -889,12 +889,13 @@ static CURLcode qs_disconnect(struct quicsocket *qs)
#elif defined(USE_GNUTLS)
gnutls_deinit(qs->ssl);
#endif
qs->ssl = NULL;
#ifdef USE_GNUTLS
if(qs->cred)
gnutls_certificate_free_credentials(qs->cred);
#endif
for(i = 0; i < 3; i++)
free(qs->crypto_data[i].buf);
Curl_safefree(qs->crypto_data[i].buf);
nghttp3_conn_del(qs->h3conn);
ngtcp2_conn_del(qs->qconn);
#ifdef USE_OPENSSL