From 5b0481d3acb8b778aaf221b50ef8f0fc6fc2c150 Mon Sep 17 00:00:00 2001 From: Michael Schenk Date: Sat, 22 Nov 2025 17:41:52 +0100 Subject: [PATCH] Fix memory leak when checking network address Ensure network interfaces are properly deleted after checking the address. --- Source/Core/PltUtilities.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Core/PltUtilities.h b/Source/Core/PltUtilities.h index d6cead73..cc4d8c03 100644 --- a/Source/Core/PltUtilities.h +++ b/Source/Core/PltUtilities.h @@ -706,7 +706,10 @@ class PLT_UPnPMessageHelper NPT_List::Iterator iface = if_list.GetFirstItem(); while (iface) { - if((*iface)->IsAddressInNetwork(address)) return true; + if((*iface)->IsAddressInNetwork(address)) { + if_list.Apply(NPT_ObjectDeleter()); + return true; + } ++iface; }