From 8b98073171e4e38e5b9794d025e626e30bd145e0 Mon Sep 17 00:00:00 2001 From: reshke Date: Mon, 4 Mar 2024 13:52:42 +0500 Subject: [PATCH] Fix leak --- sources/backend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/backend.c b/sources/backend.c index 3e1ea4725..4f570eb18 100644 --- a/sources/backend.c +++ b/sources/backend.c @@ -725,8 +725,8 @@ int od_backend_ready_wait(od_server_t *server, char *context, int count, machine_msg_data(msg), machine_msg_size(msg), 1); + machine_msg_free(msg); if (rc == -1) { - machine_msg_free(msg); return -1; } } else if (type == KIWI_BE_ERROR_RESPONSE) { @@ -739,9 +739,9 @@ int od_backend_ready_wait(od_server_t *server, char *context, int count, } else if (type == KIWI_BE_READY_FOR_QUERY) { od_backend_ready(server, machine_msg_data(msg), machine_msg_size(msg)); + machine_msg_free(msg); ready++; if (ready == count) { - machine_msg_free(msg); return query_rc; } } else {