View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0008817 | GNUnet | transport service | public | 2024-05-07 06:17 | 2024-06-08 12:03 |
| Reporter | ulfvonbelow | Assigned To | t3sserakt | ||
| 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 | 0008817: Neighbour.natted_addresses isn't destroyed in free_neighbour in gnunet-service-transport | ||||
| Description | &remove_global_addresses, despite its name, does not do any removing from the collection, and only frees the objects it iterates over. The storage for the collection itself is unaffected, and continues holding a bunch of now-invalid pointers. | ||||
| 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 transport to log to | ||||
| Additional Information | Patch attached. | ||||
| Tags | No tags attached. | ||||
| Attached Files | 0001-TRANSPORT-destroy-neighbour-natted_addresses-when-fr.patch (1,167 bytes)
From 4ca888160f5fa3ec52e741f770aa32813b1b25b9 Mon Sep 17 00:00:00 2001
From: ulfvonbelow <striness@tilde.club>
Date: Sun, 5 May 2024 23:40:23 -0500
Subject: [PATCH] TRANSPORT: destroy neighbour->natted_addresses when freeing.
The line immediately above this iterates over all of its elements, freeing
each one, but not *removing* each one, plus the map struct itself is still
around.
---
src/service/transport/gnunet-service-transport.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/service/transport/gnunet-service-transport.c b/src/service/transport/gnunet-service-transport.c
index f4be5e759..311f269b7 100644
--- a/src/service/transport/gnunet-service-transport.c
+++ b/src/service/transport/gnunet-service-transport.c
@@ -3681,6 +3681,7 @@ free_neighbour (struct Neighbour *neighbour)
GNUNET_CONTAINER_multipeermap_iterate (neighbour->natted_addresses,
&remove_global_addresses,
NULL);
+ GNUNET_CONTAINER_multipeermap_destroy (neighbour->natted_addresses);
while (NULL != (dvh = neighbour->dv_head))
{
struct DistanceVector *dv = dvh->dv;
--
2.41.0
| ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2024-05-07 06:17 | ulfvonbelow | New Issue | |
| 2024-05-07 06:17 | ulfvonbelow | File Added: 0001-TRANSPORT-destroy-neighbour-natted_addresses-when-fr.patch | |
| 2024-05-13 10:38 | schanzen | Assigned To | => t3sserakt |
| 2024-05-13 10:38 | schanzen | Status | new => assigned |
| 2024-05-14 10:44 | t3sserakt | Changeset attached | => gnunet master 12249bd3 |
| 2024-05-14 10:44 | t3sserakt | Note Added: 0022415 | |
| 2024-05-14 10:44 | t3sserakt | Status | assigned => resolved |
| 2024-05-14 10:44 | t3sserakt | Resolution | open => fixed |
| 2024-05-14 17:20 | schanzen | Fixed in Version | => 0.21.2 |
| 2024-06-08 12:03 | schanzen | Note Added: 0022530 | |
| 2024-06-08 12:03 | schanzen | Status | resolved => closed |