ngtcp2+openssl: fix leak of session

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
This commit is contained in:
Stefan Eissing 2025-11-27 12:11:39 +01:00 committed by Daniel Stenberg
parent c273de193e
commit 9bb5c0578b
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View 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;
}