View Issue Details

IDProjectCategoryView StatusLast Update
0008809GNUnettopology daemonpublic2024-06-08 12:03
Reporterulfvonbelow Assigned Toschanzen  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx86-64OSGuix SystemOS Versiona1d711c92e
Product VersionGit master 
Fixed in Version0.21.2 
Summary0008809: memory leak in gnunet-daemon-topology
DescriptionIn consider_for_advertising, builder_old is not freed.
Steps To Reproduce1. Build gnunet with --enable-sanitizer
2. Start the node with gnunet-arm -s
3. Stop the node after a bit with gnunet-arm -e
4. Observe reported memory leak wherever you've configured topology to log to
Additional InformationPatch attached.
TagsNo tags attached.
Attached Files
0001-topology-fix-memory-leak-in-gnunet-daemon-topology.patch (1,041 bytes)   
From 5935f965175f32e0f593cec1174f3f98cf37dfc8 Mon Sep 17 00:00:00 2001
From: ulfvonbelow <striness@tilde.club>
Date: Sat, 4 May 2024 19:44:19 -0500
Subject: [PATCH] topology: fix memory leak in gnunet-daemon-topology.

---
 src/service/topology/gnunet-daemon-topology.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/service/topology/gnunet-daemon-topology.c b/src/service/topology/gnunet-daemon-topology.c
index 159ba2a07..a95b67908 100644
--- a/src/service/topology/gnunet-daemon-topology.c
+++ b/src/service/topology/gnunet-daemon-topology.c
@@ -699,6 +699,7 @@ consider_for_advertising (const struct GNUNET_MessageHeader *hello)
     GNUNET_HELLO_builder_iterate (builder_old,
                                   &address_iterator,
                                   &num_addresses_old);
+    GNUNET_HELLO_builder_free (builder_old);
     if (GNUNET_TIME_absolute_cmp (new_hello_exp, >, now) &&
         (GNUNET_TIME_absolute_cmp (new_hello_exp, >, old_hello_exp) ||
          num_addresses_old < num_addresses_new))
-- 
2.41.0

Activities

schanzen

2024-05-13 10:45

administrator   ~0022393

Applied

schanzen

2024-06-08 12:03

administrator   ~0022536

0.21.2 released

Issue History

Date Modified Username Field Change
2024-05-07 05:09 ulfvonbelow New Issue
2024-05-07 05:09 ulfvonbelow File Added: 0001-topology-fix-memory-leak-in-gnunet-daemon-topology.patch
2024-05-13 10:45 schanzen Assigned To => schanzen
2024-05-13 10:45 schanzen Status new => resolved
2024-05-13 10:45 schanzen Resolution open => fixed
2024-05-13 10:45 schanzen Fixed in Version => 0.21.2
2024-05-13 10:45 schanzen Note Added: 0022393
2024-06-08 12:03 schanzen Note Added: 0022536
2024-06-08 12:03 schanzen Status resolved => closed