From c9bc0115c53e10a31ffffb6dbb1cb85e77168dda Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 28 Feb 2017 17:26:05 +0100 Subject: [PATCH] set: destroy client mq properly --- src/consensus/test_consensus.conf | 2 +- src/set/gnunet-service-set.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/consensus/test_consensus.conf b/src/consensus/test_consensus.conf index f78b77d09..036150b7f 100644 --- a/src/consensus/test_consensus.conf +++ b/src/consensus/test_consensus.conf @@ -44,7 +44,7 @@ OPTIONS = -LERROR [set] #OPTIONS = -L INFO #PREFIX = valgrind --leak-check=full -#PREFIX = valgrind +PREFIX = valgrind [testbed] OVERLAY_TOPOLOGY = CLIQUE diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c index 3e6e0791a..4168685f1 100644 --- a/src/set/gnunet-service-set.c +++ b/src/set/gnunet-service-set.c @@ -223,6 +223,9 @@ listener_destroy (struct Listener *listener) { struct GNUNET_SERVICE_Client *client = listener->client; + GNUNET_MQ_destroy (listener->client_mq); + listener->client_mq = NULL; + listener->client = NULL; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting listener client\n"); @@ -233,7 +236,6 @@ listener_destroy (struct Listener *listener) GNUNET_CONTAINER_DLL_remove (listeners_head, listeners_tail, listener); - *listener = (struct Listener) { 0 }; GNUNET_free (listener); } -- 2.25.1