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:
@@ -231,14 +231,15 @@ METHOD(tls_application_t, process, status_t,
|
|||||||
{
|
{
|
||||||
DBG1(DBG_IKE, "%N method not available",
|
DBG1(DBG_IKE, "%N method not available",
|
||||||
eap_type_names, EAP_IDENTITY);
|
eap_type_names, EAP_IDENTITY);
|
||||||
|
in->destroy(in);
|
||||||
return FAILED;
|
return FAILED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->method->process(this->method, in, &this->out) != SUCCESS)
|
if (this->method->process(this->method, in, &this->out) != SUCCESS)
|
||||||
{
|
{
|
||||||
|
|
||||||
DBG1(DBG_IKE, "%N method failed", eap_type_names, EAP_IDENTITY);
|
DBG1(DBG_IKE, "%N method failed", eap_type_names, EAP_IDENTITY);
|
||||||
|
in->destroy(in);
|
||||||
return FAILED;
|
return FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user