From a5474f394b1a69b149dbc515f3c4165e06fc2948 Mon Sep 17 00:00:00 2001 From: NikitaUnisikhin Date: Fri, 26 Jan 2024 21:13:15 +0000 Subject: [PATCH] fixed --- sources/frontend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/frontend.c b/sources/frontend.c index 40195c61f..3e5151eb9 100644 --- a/sources/frontend.c +++ b/sources/frontend.c @@ -996,7 +996,7 @@ static od_frontend_status_t od_frontend_remote_client(od_relay_t *relay, "%s", kiwi_fe_type_to_string(type)); od_frontend_status_t retstatus = OD_OK; - machine_msg_t *msg; + machine_msg_t *msg = NULL; bool forwarded = 0; switch (type) { case KIWI_FE_COPY_DONE: @@ -1513,7 +1513,7 @@ static od_frontend_status_t od_frontend_remote_client(od_relay_t *relay, } /* If the retstatus is not SKIP */ - if (route->rule->pool->reserve_prepared_statement && forwarded != 1) { + if (route->rule->pool->reserve_prepared_statement && forwarded != 1 && msg != NULL) { msg = kiwi_fe_copy_msg(msg, data, size); od_write(&server->io, msg); retstatus = OD_SKIP;