eap-ttls: Fix memory leaks in error cases related to EAP-Identity handling

Should be rare that the eap-identity plugin is not loaded when
authenticating clients with EAP.  And the second error path will
currently never get used as `process()` always succeeds.

Fixes: 79f2102cb4 ("implemented server side support for EAP-TTLS")
This commit is contained in:
Tobias Brunner
2026-07-24 08:47:39 +02:00
parent f95c6a2e03
commit 94e97eb183
@@ -231,14 +231,15 @@ METHOD(tls_application_t, process, status_t,
{
DBG1(DBG_IKE, "%N method not available",
eap_type_names, EAP_IDENTITY);
in->destroy(in);
return FAILED;
}
}
if (this->method->process(this->method, in, &this->out) != SUCCESS)
{
DBG1(DBG_IKE, "%N method failed", eap_type_names, EAP_IDENTITY);
in->destroy(in);
return FAILED;
}