View Issue Details

IDProjectCategoryView StatusLast Update
0008792GNUnetpeerstorepublic2024-06-08 12:03
Reporterulfvonbelow Assigned Toschanzen  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx86-64OSGuix SystemOS Versiona1d711c92e
Product Version0.21.1 
Fixed in Version0.21.2 
Summary0008792: memory leak in gnunet-service-peerstore
Descriptionthe sub_system and key fields of struct Monitor aren't freed when it is.
Steps To Reproduce1. ./configure --enable-sanitizer ; make ; make check
2. Observe memory leak in anything that runs gnunet-service-peerstore
Additional InformationPatch attached.
TagsNo tags attached.
Attached Files
0001-peerstore-fix-memory-leak-in-gnunet-service-peerstor.patch (840 bytes)   
From 622d7a7528c1e3ef6664b2c7c5f24b8a463b3438 Mon Sep 17 00:00:00 2001
From: ulfvonbelow <striness@tilde.club>
Date: Thu, 2 May 2024 19:30:36 -0500
Subject: [PATCH] peerstore: fix memory leak in gnunet-service-peerstore.

---
 src/service/peerstore/gnunet-service-peerstore.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/service/peerstore/gnunet-service-peerstore.c b/src/service/peerstore/gnunet-service-peerstore.c
index 37af3af56..214f9f9ba 100644
--- a/src/service/peerstore/gnunet-service-peerstore.c
+++ b/src/service/peerstore/gnunet-service-peerstore.c
@@ -1090,6 +1090,8 @@ client_disconnect_cb (void *cls,
       GNUNET_SCHEDULER_cancel (mo->sa_wait_warning);
       mo->sa_wait_warning = NULL;
     }
+    GNUNET_free (mo->sub_system);
+    GNUNET_free (mo->key);
     GNUNET_free (mo);
     break;
   }
-- 
2.41.0

Activities

schanzen

2024-05-05 14:13

administrator   ~0022347

applied

schanzen

2024-06-08 12:03

administrator   ~0022553

0.21.2 released

Issue History

Date Modified Username Field Change
2024-05-03 03:58 ulfvonbelow New Issue
2024-05-03 03:58 ulfvonbelow File Added: 0001-peerstore-fix-memory-leak-in-gnunet-service-peerstor.patch
2024-05-05 14:13 schanzen Assigned To => schanzen
2024-05-05 14:13 schanzen Status new => resolved
2024-05-05 14:13 schanzen Resolution open => fixed
2024-05-05 14:13 schanzen Fixed in Version => 0.21.2
2024-05-05 14:13 schanzen Note Added: 0022347
2024-06-08 12:03 schanzen Note Added: 0022553
2024-06-08 12:03 schanzen Status resolved => closed