[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 12/28: JSON: fix memory leaks in test.
From: |
gnunet |
Subject: |
[gnunet] 12/28: JSON: fix memory leaks in test. |
Date: |
Mon, 06 Feb 2023 06:19:14 +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 f7a3ef7b46311a01d5934a52b2fc0962f833a73f
Author: ulfvonbelow <strilen@tilde.club>
AuthorDate: Sun Jan 29 06:49:28 2023 -0600
JSON: fix memory leaks in test.
This allows us to use sanitizers to find bugs that matter.
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
---
src/json/test_json.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/json/test_json.c b/src/json/test_json.c
index d6c372cf3..db376d213 100644
--- a/src/json/test_json.c
+++ b/src/json/test_json.c
@@ -141,6 +141,7 @@ test_raw ()
GNUNET_assert (NULL != j);
GNUNET_assert (GNUNET_OK == GNUNET_JSON_parse (j, spec, NULL, NULL));
GNUNET_assert (0 == memcmp (blob, blob2, i));
+ json_decref (j);
}
return 0;
}
@@ -177,6 +178,8 @@ test_rsa ()
GNUNET_assert (GNUNET_OK == GNUNET_JSON_parse (js, sspec, NULL, NULL));
GNUNET_break (0 == GNUNET_CRYPTO_rsa_signature_cmp (sig, sig2));
GNUNET_break (0 == GNUNET_CRYPTO_rsa_public_key_cmp (pub, pub2));
+ json_decref (jp);
+ json_decref (js);
GNUNET_CRYPTO_rsa_signature_free (sig);
GNUNET_CRYPTO_rsa_signature_free (sig2);
GNUNET_CRYPTO_rsa_private_key_free (priv);
@@ -216,6 +219,8 @@ test_boolean ()
GNUNET_assert (GNUNET_OK != GNUNET_JSON_parse (json, pspec, NULL, NULL));
+ json_decref (json);
+
return 0;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] branch master updated (d8cbbb5b6 -> dc5501061), gnunet, 2023/02/06
- [gnunet] 01/28: -Fix -Wstacl-protector typo., gnunet, 2023/02/06
- [gnunet] 02/28: NAT: don't leak AddrEntries when unregistering., gnunet, 2023/02/06
- [gnunet] 03/28: -Miscellaneous mostly-comment typo fixes., gnunet, 2023/02/06
- [gnunet] 04/28: -CORE: fix memory leak in test., gnunet, 2023/02/06
- [gnunet] 08/28: -GNS: use proper config file name in test_proxy.sh., gnunet, 2023/02/06
- [gnunet] 11/28: HELLO: fix memory leak in GNUNET_HELLO_extract_address., gnunet, 2023/02/06
- [gnunet] 17/28: PEERSTORE: fix write-after-free in handle_{iterate_end,watch_record}, gnunet, 2023/02/06
- [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 <=
- [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, 2023/02/06
- [gnunet] 27/28: SETU: prevent misaligned access to StrataEstimatorMessage.set_size., gnunet, 2023/02/06