From: Stefan Eissing Date: Thu, 29 Aug 2024 11:06:47 +0000 (+0200) Subject: openssl quic: fix memory leak X-Git-Tag: curl-8_10_0~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4abf2b9699840627e942846c51e564a58aacb52a;p=thirdparty%2Fcurl.git openssl quic: fix memory leak 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 --- diff --git a/lib/vquic/curl_osslq.c b/lib/vquic/curl_osslq.c index 53c638fe68..4c58ad7d5a 100644 --- a/lib/vquic/curl_osslq.c +++ b/lib/vquic/curl_osslq.c @@ -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;