diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 5e5329a22..7220f400a 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -6037,7 +6037,7 @@ void ssl_sock_handle_hs_error(struct connection *conn) */ static int ssl_sock_handshake(struct connection *conn, unsigned int flag) { - struct ssl_sock_ctx *ctx = conn_get_ssl_sock_ctx(conn); + struct ssl_sock_ctx *ctx; int ret; struct ssl_counters *counters = NULL; struct ssl_counters *counters_px = NULL; @@ -6049,6 +6049,7 @@ static int ssl_sock_handshake(struct connection *conn, unsigned int flag) if (!conn_ctrl_ready(conn)) return 0; + ctx = conn_get_ssl_sock_ctx(conn); if (!ctx) goto out_error;