summaryrefslogtreecommitdiff
path: root/lib/vquic/ngtcp2.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vquic/ngtcp2.c')
-rw-r--r--lib/vquic/ngtcp2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c
index 9569431ca..69dd14074 100644
--- a/lib/vquic/ngtcp2.c
+++ b/lib/vquic/ngtcp2.c
@@ -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);