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 <ch1nn1y@yandex-team.ru>
This commit is contained in:
Ovchinnikov Andrew 2024-02-21 09:49:48 +03:00 committed by GitHub
parent 4e26ef5941
commit dc2122ac90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -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*/