View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0008809 | GNUnet | topology daemon | public | 2024-05-07 05:09 | 2024-06-08 12:03 |
| Reporter | ulfvonbelow | Assigned To | schanzen | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Platform | x86-64 | OS | Guix System | OS Version | a1d711c92e |
| Product Version | Git master | ||||
| Fixed in Version | 0.21.2 | ||||
| Summary | 0008809: memory leak in gnunet-daemon-topology | ||||
| Description | In consider_for_advertising, builder_old is not freed. | ||||
| Steps To Reproduce | 1. 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 Information | Patch attached. | ||||
| Tags | No 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
| ||||
| 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 |