[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 10/28: -HELLO: fix memory leaks in tests.
From: |
gnunet |
Subject: |
[gnunet] 10/28: -HELLO: fix memory leaks in tests. |
Date: |
Mon, 06 Feb 2023 06:19:12 +0100 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
commit efad40e99f1d00b41814d9a5ee856a88e1be979e
Author: ulfvonbelow <strilen@tilde.club>
AuthorDate: Sun Jan 29 07:05:06 2023 -0600
-HELLO: fix memory leaks in tests.
This allows us to use sanitizers to find bugs that matter.
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
---
src/hello/test_hello-ng.c | 8 ++++++--
src/hello/test_hello-uri.c | 1 +
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/hello/test_hello-ng.c b/src/hello/test_hello-ng.c
index 4ace9439f..ef84e2425 100644
--- a/src/hello/test_hello-ng.c
+++ b/src/hello/test_hello-ng.c
@@ -31,6 +31,7 @@ main (int argc,
struct GNUNET_PeerIdentity pid;
struct GNUNET_TIME_Absolute t = GNUNET_TIME_absolute_get ();
char *res;
+ char *address;
size_t res_len;
enum GNUNET_NetworkType nt;
@@ -47,10 +48,13 @@ main (int argc,
GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
"%s\n", res);
GNUNET_assert (NULL !=
- GNUNET_HELLO_extract_address ((void**) res,
+ (address =
+ GNUNET_HELLO_extract_address ((void**) res,
res_len,
&pid,
&nt,
- &t));
+ &t)));
+ GNUNET_free (address);
+ GNUNET_free (res);
return 0;
}
diff --git a/src/hello/test_hello-uri.c b/src/hello/test_hello-uri.c
index 7e70d6763..01b6f2d8e 100644
--- a/src/hello/test_hello-uri.c
+++ b/src/hello/test_hello-uri.c
@@ -207,6 +207,7 @@ main (int argc,
url);
GNUNET_free (url);
}
+ GNUNET_HELLO_builder_free (b);
return 0;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] 18/28: RECLAIM: rename G_D_key_covert_... to G_D_key_convert_..., (continued)
- [gnunet] 18/28: RECLAIM: rename G_D_key_covert_... to G_D_key_convert_..., gnunet, 2023/02/06
- [gnunet] 12/28: JSON: fix memory leaks in test., gnunet, 2023/02/06
- [gnunet] 06/28: DHT: remove "memory leak" in gnunet-dht-{get,put}., gnunet, 2023/02/06
- [gnunet] 05/28: -DATACACHE: fix memory leaks in tests., gnunet, 2023/02/06
- [gnunet] 07/28: FS: fix memory leak in GNUNET_FS_search_stop., gnunet, 2023/02/06
- [gnunet] 09/28: GNSRECORD: fix memory leaks in tests., gnunet, 2023/02/06
- [gnunet] 16/28: NAMESTORE: avoid use-after-free in handle_record_result., gnunet, 2023/02/06
- [gnunet] 15/28: NAMESTORE: fix overread in handle_record_store., gnunet, 2023/02/06
- [gnunet] 13/28: -NAMESTORE: fix memory leaks in tests., gnunet, 2023/02/06
- [gnunet] 14/28: NAMESTORE: fix memory leak in parse_recordline., gnunet, 2023/02/06
- [gnunet] 10/28: -HELLO: fix memory leaks in tests.,
gnunet <=
- [gnunet] 27/28: SETU: prevent misaligned access to StrataEstimatorMessage.set_size., gnunet, 2023/02/06
- [gnunet] 23/28: REVOCATION: don't leak signature purpose memory., gnunet, 2023/02/06
- [gnunet] 25/28: SETU: avoid 64-bit shift on 64-bit value., gnunet, 2023/02/06
- [gnunet] 28/28: SETU: don't leak Operation.{message_control_flow,inquiries_sent}., gnunet, 2023/02/06
- [gnunet] 19/28: RECLAIM: fix 1-byte overflow in DID_did_to_pkey., gnunet, 2023/02/06
- [gnunet] 22/28: TESTBED: don't leak helper_argv when SSH can't be executed., gnunet, 2023/02/06
- [gnunet] 24/28: REST: don't leak basic_auth_file., gnunet, 2023/02/06
- [gnunet] 26/28: -SECRETSHARING: don't leak my_share in test., gnunet, 2023/02/06
- [gnunet] 20/28: RECLAIM: don't leak the elements of attr_list., gnunet, 2023/02/06
- [gnunet] 21/28: -RECLAIM: fix memory leaks in tests., gnunet, 2023/02/06