[PATCH] tls: Fix possible memory leak
Bastien Nocera <[email protected]> Wed, 20 Aug 2025 16:13:58 +0200
| Newsgroups | dev.linux.lists.ell |
|---|---|
| Message-ID | <[email protected]> |
ell/tls-suites.c:784:3: leaked_storage: Variable "other_public" going out of scope leaks the storage it points to.
---
ell/tls-suites.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ell/tls-suites.c b/ell/tls-suites.c
index eb023a6bf2c0..233ed162fa62 100644
--- a/ell/tls-suites.c
+++ b/ell/tls-suites.c
@@ -781,6 +781,7 @@ static void tls_handle_ecdhe_client_key_xchg(struct l_tls *tls,
&secret)) {
TLS_DISCONNECT(TLS_ALERT_INTERNAL_ERROR, 0,
"Generating ECDH shared-secret failed");
+ l_ecc_point_free(other_public);
return;
}
--
2.50.1