]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ngtcp2+openssl: fix leak of session
authorStefan Eissing <stefan@eissing.org>
Thu, 27 Nov 2025 11:11:39 +0000 (12:11 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 27 Nov 2025 11:35:39 +0000 (12:35 +0100)
Fix return value indicating to OpenSSL if reference to session is kept
(it is not), so OpenSSL frees it.

Reported-by: Aleksei Bavshin
Fixes #19717
Closes #19718

lib/vquic/curl_ngtcp2.c

index ad1f2b2b25c8e62f587f151aa9185a04d764ee53..61b233e4ffc00bdc0022a67256c8543c9e9eb579 100644 (file)
@@ -2277,7 +2277,6 @@ static int quic_ossl_new_session_cb(SSL *ssl, SSL_SESSION *ssl_sessionid)
 #endif
     Curl_ossl_add_session(cf, data, ctx->peer.scache_key, ssl_sessionid,
                           SSL_version(ssl), "h3", quic_tp, quic_tp_len);
-    return 1;
   }
   return 0;
 }