Commit 94e97eb183 for strongswan.org

commit 94e97eb1837adc2db5cd5c46e840307ba6e40d68
Author: Tobias Brunner <tobias@strongswan.org>
Date:   Mon Jul 20 09:42:39 2026 +0200

    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: 79f2102cb442 ("implemented server side support for EAP-TTLS")

diff --git a/src/libcharon/plugins/eap_ttls/eap_ttls_server.c b/src/libcharon/plugins/eap_ttls/eap_ttls_server.c
index fc97f811ca..86f5037651 100644
--- a/src/libcharon/plugins/eap_ttls/eap_ttls_server.c
+++ b/src/libcharon/plugins/eap_ttls/eap_ttls_server.c
@@ -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;
 		}