From 45140f0fd3426e9689c6d1e5e758f1b75c450e90 Mon Sep 17 00:00:00 2001 From: David Barksdale Date: Mon, 9 Oct 2017 21:42:12 -0500 Subject: [PATCH] Fix memory leak in test_core_api_reliability --- src/core/test_core_api_reliability.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c index 900c9f732..528093c99 100644 --- a/src/core/test_core_api_reliability.c +++ b/src/core/test_core_api_reliability.c @@ -381,6 +381,7 @@ process_hello (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received (my) `%s' from transport service\n", "HELLO"); GNUNET_assert (message != NULL); + GNUNET_free_non_null (p->hello); p->hello = GNUNET_copy_message (message); if ((p == &p1) && (NULL == p2.oh)) p2.oh = GNUNET_TRANSPORT_offer_hello (p2.cfg, @@ -518,6 +519,8 @@ main (int argc, &ok); stop_arm (&p1); stop_arm (&p2); + GNUNET_free_non_null (p1.hello); + GNUNET_free_non_null (p2.hello); GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-1"); GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-2"); -- 2.25.1