Skip to contentSkip to conversation

tls: Fix possible memory leak

PATCH Applied Bastien Nocera 2 participants 2 messages Aug 20, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tls: Fix possible memory leak

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(+)
ell/tls-suites.c +1 -0
index eb023a6bf2c0..233ed162fa62 100644
@@ -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;
 	}
 
Signature · 1 line
2.50.1
#1 lore raw

Hi Bastien,

Quoted 5 lines · Bastien Nocera

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(+)

Applied, thanks.

Regards,
-Denis