View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0008814 | GNUnet | transport service | public | 2024-05-07 05:41 | 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 | 0008814: memory leaks in mq_init of both tcp and udp communicators | ||||
Description | In the "queue already exists" case, the socket address is leaked. | ||||
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 communicator-udp or communicator-tcp to log to | ||||
Additional Information | Patch attached. | ||||
Tags | No tags attached. | ||||
Attached Files | 0001-transport-fix-mq_init-memory-leak-in-already-exists-.patch (1,499 bytes)
From 2b8727abff5f9faf51f0f0647ede88a58ea90203 Mon Sep 17 00:00:00 2001 From: ulfvonbelow <striness@tilde.club> Date: Sun, 5 May 2024 12:02:29 -0500 Subject: [PATCH] transport: fix mq_init memory leak in already-exists case. --- src/service/transport/gnunet-communicator-tcp.c | 1 + src/service/transport/gnunet-communicator-udp.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/service/transport/gnunet-communicator-tcp.c b/src/service/transport/gnunet-communicator-tcp.c index d13473b0a..1e0d47776 100644 --- a/src/service/transport/gnunet-communicator-tcp.c +++ b/src/service/transport/gnunet-communicator-tcp.c @@ -3347,6 +3347,7 @@ mq_init (void *cls, const struct GNUNET_PeerIdentity *peer, const char *address) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Queue for %s already exists or is in construction\n", address); + GNUNET_free (in); return GNUNET_NO; } switch (in->sa_family) diff --git a/src/service/transport/gnunet-communicator-udp.c b/src/service/transport/gnunet-communicator-udp.c index 2a2f3a409..938e53670 100644 --- a/src/service/transport/gnunet-communicator-udp.c +++ b/src/service/transport/gnunet-communicator-udp.c @@ -2903,6 +2903,7 @@ mq_init (void *cls, const struct GNUNET_PeerIdentity *peer, const char *address) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "receiver %s already exist or is being connected to\n", address); + GNUNET_free (in); return GNUNET_NO; } -- 2.41.0 | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2024-05-07 05:41 | ulfvonbelow | New Issue | |
2024-05-07 05:41 | ulfvonbelow | File Added: 0001-transport-fix-mq_init-memory-leak-in-already-exists-.patch | |
2024-05-13 10:41 | schanzen | Assigned To | => schanzen |
2024-05-13 10:41 | schanzen | Status | new => resolved |
2024-05-13 10:41 | schanzen | Resolution | open => fixed |
2024-05-13 10:41 | schanzen | Fixed in Version | => 0.21.2 |
2024-05-13 10:41 | schanzen | Note Added: 0022387 | |
2024-06-08 12:03 | schanzen | Note Added: 0022540 | |
2024-06-08 12:03 | schanzen | Status | resolved => closed |