Client memory leak
Description
Using the client subscription library, memory leak appear in tests that are not in the unit tests yet. When a connection fails, the UserIdentityToken
allocated in SOPC_ToolkitClient_AsyncActivateSession_UsernamePassword
is not freed. The problem does not seem to be bound to the client subscription library.
Analysis
When the connection fails before a secure channel exists, the UserIdentityToken
is stored in session_to_activate_user[session_core_bs__p_session]
(session_core_bs.c
). However, it should be transferred to sessionDataArray[session_core_bs__p_session].user_client
so that it is freed on session closure.