summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-06-15 10:36:32 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-06-18 00:20:42 +0200
commitb6af4c233619437676c38e30d48dae16f03ef843 (patch)
treeb662ade4e452f845f98d6990e8c91a60a8071d19 /lib
parent3bf18cdadd91bbd5250b257bc1b933f0c02a9591 (diff)
downloadcurl-b6af4c233619437676c38e30d48dae16f03ef843.tar.gz
ngtcp2: fix happy eyeballs quic connect crash
Reported-by: Peter Wu Fixes #5565 Closes #5568
Diffstat (limited to 'lib')
-rw-r--r--lib/vquic/ngtcp2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c
index 5a87a29be..e669e2342 100644
--- a/lib/vquic/ngtcp2.c
+++ b/lib/vquic/ngtcp2.c
@@ -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