Open
Description
Describe the bug
In ArbitratedClientManager::performClientRequest, in case of none oneway API token is aquired:
The token is released just as part of calling m_arbitrator->clientReceive(token), but this call is done just if codec status is OK:
erpc/erpc_c/infra/erpc_arbitrated_client_manager.cpp
Lines 83 to 86 in 5c2c6b7
Hence if m_arbitrator->send fails, the token won't get released:
erpc/erpc_c/infra/erpc_arbitrated_client_manager.cpp
Lines 77 to 78 in 5c2c6b7
To Reproduce
Loop calls of none oneway API on arbitrated client, where transport layer send fails.
You expect in first tomes to get the send fail, till memory leakege block your system and then the token getting will fail:
erpc/erpc_c/infra/erpc_arbitrated_client_manager.cpp
Lines 59 to 62 in 5c2c6b7
Expected behavior
Token is always released before exiting ArbitratedClientManager::performClientRequest
Screenshots
Desktop (please complete the following information)
- OS: windows
- eRPC Version:1.13.0
Steps you didn't forgot to do
- I checked if there is no related issue opened/closed.
- I checked that there doesn't exist opened PR which is solving this issue.