summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-07-27 11:17:31 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-07-27 12:53:46 +0200
commit425fa864ce4cc2326996c8fd280ddf61e485ba23 (patch)
treeb18ca7f7e2144125369b02342f5f943417e43c39 /lib
parent0b859692265bccd5ffdc1be27e7307b2d2fa7c1a (diff)
downloadcurl-425fa864ce4cc2326996c8fd280ddf61e485ba23.tar.gz
quiche: handle calling disconnect twice
Reported-by: lilongyan-huawei on github Fixes #5726 Closes #5727
Diffstat (limited to 'lib')
-rw-r--r--lib/vquic/quiche.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/vquic/quiche.c b/lib/vquic/quiche.c
index be6f15c19..fd9cb8bd3 100644
--- a/lib/vquic/quiche.c
+++ b/lib/vquic/quiche.c
@@ -95,8 +95,14 @@ static CURLcode qs_disconnect(struct quicsocket *qs)
quiche_h3_config_free(qs->h3config);
if(qs->h3c)
quiche_h3_conn_free(qs->h3c);
- quiche_config_free(qs->cfg);
- quiche_conn_free(qs->conn);
+ if(qs->cfg) {
+ quiche_config_free(qs->cfg);
+ qs->cfg = NULL;
+ }
+ if(qs->conn) {
+ quiche_conn_free(qs->conn);
+ qs->conn = NULL;
+ }
return CURLE_OK;
}