BUG/MEDIUM: ssl: Fix a crash if we failed to create the mux

In ssl_sock_io_cb(), if we failed to create the mux, we may have
destroyed the connection, so only attempt to access it to get the ALPN
if conn_create_mux() was successful.
This fixes crashes that may happen when using ssl.
This commit is contained in:
Olivier Houchard 2025-09-10 12:03:01 +02:00 committed by Olivier Houchard
parent 1759c97255
commit 07c10ec2f1

View File

@ -6500,7 +6500,7 @@ struct task *ssl_sock_io_cb(struct task *t, void *context, unsigned int state)
* already, and immediately know which mux * already, and immediately know which mux
* to use, in case we want to use 0RTT. * to use, in case we want to use 0RTT.
*/ */
if (conn_is_back(conn)) { if (ret >= 0 && conn_is_back(conn)) {
struct server *srv; struct server *srv;
const char *alpn; const char *alpn;
int len; int len;