From ea4e77c638f8dd49e87af9e73b32d8aec3283795 Mon Sep 17 00:00:00 2001 From: Lee Smet Date: Mon, 28 Apr 2025 15:34:26 +0200 Subject: [PATCH] Fix memory leak in handle_dead_peers Signed-off-by: Lee Smet --- CHANGELOG.md | 3 ++- mycelium/src/router.rs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb072f0..a945037 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed an unsoundness issue in the routing table clone implementation +- Fixed an unsoundness issue in the routing table clone implementation. +- Clear dead peer buffer once peers have been removed from the routing table. ## [0.6.0] - 2025-04-25 diff --git a/mycelium/src/router.rs b/mycelium/src/router.rs index 8ed3384..bab1d1a 100644 --- a/mycelium/src/router.rs +++ b/mycelium/src/router.rs @@ -545,6 +545,7 @@ where break; } self.handle_dead_peer(&tx_buf[..received]); + tx_buf.clear(); } warn!("Processing of dead peers halted"); }