From dc2122ac90a90a71786c5f7550245584fbf9a0b5 Mon Sep 17 00:00:00 2001 From: Ovchinnikov Andrew <63587191+AndrewOvvv@users.noreply.github.com> Date: Wed, 21 Feb 2024 09:49:48 +0300 Subject: [PATCH] Mdb iamproxy fix core dump (#578) * make some functions from mdb_iamproxy.c static * fix new line symbol missing * make apply_fmt * fix warnings during building * make apply_fmt * fix issues * fixes of unclosed io object; fix memory leaks * make apply_fmt --------- Co-authored-by: Andrey Ovchinnikov --- sources/mdb_iamproxy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sources/mdb_iamproxy.c b/sources/mdb_iamproxy.c index 9c50f683..dce7c85f 100644 --- a/sources/mdb_iamproxy.c +++ b/sources/mdb_iamproxy.c @@ -176,6 +176,7 @@ int mdb_iamproxy_authenticate_user( od_error(&instance->logger, "auth", client, NULL, "failed to send username to msg_username"); authentication_result = MDB_IAMPROXY_CONN_ERROR; + machine_msg_free(msg_username); goto free_io; } @@ -190,6 +191,7 @@ int mdb_iamproxy_authenticate_user( od_error(&instance->logger, "auth", client, NULL, "failed to write token to msg_token"); authentication_result = MDB_IAMPROXY_CONN_ERROR; + machine_msg_free(msg_token); goto free_io; } @@ -252,6 +254,7 @@ int mdb_iamproxy_authenticate_user( free_auth_status: machine_msg_free(auth_status); free_io: + machine_close(io); machine_io_free(io); free_end: /*RETURN RESULT*/