From: Daniel Stenberg Date: Mon, 15 Jun 2020 08:36:32 +0000 (+0200) Subject: ngtcp2: fix happy eyeballs quic connect crash X-Git-Tag: curl-7_71_0~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b6af4c233619437676c38e30d48dae16f03ef843;p=thirdparty%2Fcurl.git ngtcp2: fix happy eyeballs quic connect crash Reported-by: Peter Wu Fixes #5565 Closes #5568 --- diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c index 5a87a29be5..e669e23427 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