From 2addaf87037b6ec138d64abf71e17719a3a131a2 Mon Sep 17 00:00:00 2001
From: ulfvonbelow <strilen@tilde.club>
Date: Sun, 29 Jan 2023 07:10:47 -0600
Subject: [PATCH] -CORE: fix memory leak in test.

This allows us to use sanitizers to find bugs that matter.
---
 src/core/test_core_quota_compliance.c | 1 +
 1 file changed, 1 insertion(+)

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,
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Received (my) HELLO from transport service\n");
   GNUNET_assert (message != NULL);
+  if (NULL != p->hello) GNUNET_free (p->hello);
   p->hello = GNUNET_malloc (ntohs (message->size));
   GNUNET_memcpy (p->hello, message, ntohs (message->size));
   if ((p == &p1) &&
-- 
2.38.1

