From 68590cae33fc45f977d3771f761a959b06524bc9 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Thu, 27 Feb 2025 11:25:38 -0500 Subject: [PATCH] http: Avoid a potential null dereference. --- src/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http.c b/src/http.c index fbf656b44..92fccc83d 100644 --- a/src/http.c +++ b/src/http.c @@ -396,7 +396,7 @@ static void _http_add_body_bytes(tf_http_connection_t* connection, const void* d if (fin) { - if (connection->request->on_message) + if (connection->request && connection->request->on_message) { tf_trace_begin(connection->http->trace, connection->trace_name ? connection->trace_name : "websocket"); connection->request->on_message(connection->request, connection->fragment_length ? connection->fragment_op_code : op_code,