Client Wrapper: avoid possible memory leak on subcription on client clear/disconnect
Description
When SOPC_ClientConfigHelper_Clear
is called, if there are some remaining active connections those are automatically disconnected.
But if a subscription was active on those connections, the corresponding SOPC_ClientHelper_Subscription*
memory is not freed and leads to memory leak and the subscription was not properly deleted prior to connection closure.
Implementation
Client connection should keep track of the allocated SOPC_ClientHelper_Subscription*
and should delete the subscription during SOPC_ClientHelperNew_Disconnect
call if it was not done by application.
Note: the application shall not use the SOPC_ClientHelper_Subscription*
pointer as it is freed after disconnection.