]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
openssl quic: fix memory leak
authorStefan Eissing <stefan@eissing.org>
Thu, 29 Aug 2024 11:06:47 +0000 (13:06 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 29 Aug 2024 14:48:49 +0000 (16:48 +0200)
When a OpenSSL quic connection filter is aborted early, as the
server was not responding, the ssl instances where not closed
as they should.

Fixes #14720
Reported-by: ralfjunker on github
Closes #14724

lib/vquic/curl_osslq.c

index 53c638fe6805030a2deb62308c678744b07c0bcc..4c58ad7d5ad6b4d51e67c8d3745ec209656515cf 100644 (file)
@@ -434,6 +434,8 @@ static void cf_osslq_destroy(struct Curl_cfilter *cf, struct Curl_easy *data)
   CURL_TRC_CF(data, cf, "destroy");
   if(ctx) {
     CURL_TRC_CF(data, cf, "cf_osslq_destroy()");
+    if(ctx->tls.ossl.ssl)
+      cf_osslq_ctx_close(ctx);
     cf_osslq_ctx_free(ctx);
   }
   cf->ctx = NULL;