View Issue Details

IDProjectCategoryView StatusLast Update
0007629GNUnettestbed servicepublic2024-02-29 22:46
Reporterulfvonbelow Assigned Toschanzen  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.19.4Fixed in Version0.19.4 
Summary0007629: Memory leak in GNUNET_TESTBED_is_host_habitable
Descriptionh->helper_argv is not freed if SSH can't be exec'ed.
Steps To Reproduce./configure --enable-sanitizer
make
make install
make check
Additional InformationPatch attached.
Tagsmemory-leak, patch
Attached Files
0001-TESTBED-don-t-leak-helper_argv-when-SSH-can-t-be-exe.patch (714 bytes)   
From cc28aef56a45f6d5c79e3e1b4f6441e79255baf8 Mon Sep 17 00:00:00 2001
From: ulfvonbelow <strilen@tilde.club>
Date: Sun, 29 Jan 2023 05:55:44 -0600
Subject: [PATCH] TESTBED: don't leak helper_argv when SSH can't be executed.

---
 src/testbed/testbed_api_hosts.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/testbed/testbed_api_hosts.c b/src/testbed/testbed_api_hosts.c
index 824bd0187..84871eb70 100644
--- a/src/testbed/testbed_api_hosts.c
+++ b/src/testbed/testbed_api_hosts.c
@@ -1339,6 +1339,7 @@ GNUNET_TESTBED_is_host_habitable (
   if (NULL == h->auxp)
   {
     GNUNET_break (0);  /* Cannot exec SSH? */
+    free_argv (h->helper_argv);
     GNUNET_free (h);
     return NULL;
   }
-- 
2.38.1

Activities

schanzen

2023-06-01 20:26

administrator   ~0020237

released some time ago

Issue History

Date Modified Username Field Change
2023-01-29 22:33 ulfvonbelow New Issue
2023-01-29 22:33 ulfvonbelow Tag Attached: bug
2023-01-29 22:33 ulfvonbelow Tag Attached: memory-leak
2023-01-29 22:33 ulfvonbelow Tag Attached: patch
2023-01-29 22:33 ulfvonbelow File Added: 0001-TESTBED-don-t-leak-helper_argv-when-SSH-can-t-be-exe.patch
2023-02-06 06:11 schanzen Assigned To => schanzen
2023-02-06 06:11 schanzen Status new => resolved
2023-02-06 06:11 schanzen Resolution open => fixed
2023-02-06 06:11 schanzen Fixed in Version => 0.19.4
2023-02-06 06:19 schanzen Target Version => 0.19.4
2023-06-01 20:26 schanzen Note Added: 0020237
2023-06-01 20:26 schanzen Status resolved => closed
2024-02-29 22:46 Christian Grothoff Tag Detached: bug