GetEndpoint service: possible double free when endpoint with security mode None not declared first
Description
When an endpoint with security mode None is not declared first in the configuration it causes a double free memory corruption.
Analysis
This is due to a temporary structure reused several times which does not reset the server certificate pointer field when it is not set (None security mode case). Therefore it is freed several times when all endpoint descriptions are freed.
Fix
Do not reuse the temporary structure to avoid the issue.