diff options
author | ulfvonbelow <strilen@tilde.club> | 2023-01-29 07:10:47 -0600 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2023-02-06 13:51:52 +0900 |
commit | 913ea68f2d8ced3fb78cff773757f5846b308cae (patch) | |
tree | 4419b4793cead20631314bf424916bf9e4ca7748 | |
parent | fa423b69af7c64f83790d7ca8990dc8532217baf (diff) | |
download | gnunet-913ea68f2d8ced3fb78cff773757f5846b308cae.tar.gz gnunet-913ea68f2d8ced3fb78cff773757f5846b308cae.zip |
-CORE: fix memory leak in test.
This allows us to use sanitizers to find bugs that matter.
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
-rw-r--r-- | src/core/test_core_quota_compliance.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c index eb5ca7c2b..099c6fa3b 100644 --- a/src/core/test_core_quota_compliance.c +++ b/src/core/test_core_quota_compliance.c | |||
@@ -530,6 +530,7 @@ process_hello (void *cls, | |||
530 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 530 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
531 | "Received (my) HELLO from transport service\n"); | 531 | "Received (my) HELLO from transport service\n"); |
532 | GNUNET_assert (message != NULL); | 532 | GNUNET_assert (message != NULL); |
533 | if (NULL != p->hello) GNUNET_free (p->hello); | ||
533 | p->hello = GNUNET_malloc (ntohs (message->size)); | 534 | p->hello = GNUNET_malloc (ntohs (message->size)); |
534 | GNUNET_memcpy (p->hello, message, ntohs (message->size)); | 535 | GNUNET_memcpy (p->hello, message, ntohs (message->size)); |
535 | if ((p == &p1) && | 536 | if ((p == &p1) && |