summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-02-28 17:26:05 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-02-28 17:26:05 +0100
commitc9bc0115c53e10a31ffffb6dbb1cb85e77168dda (patch)
tree18e9accf94f1b157606a82fada7470cc8a9da376 /src
parentc7df81667de9046ada75fbe15924a426d8b5d765 (diff)
set: destroy client mq properly
Diffstat (limited to 'src')
-rw-r--r--src/consensus/test_consensus.conf2
-rw-r--r--src/set/gnunet-service-set.c4
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);
}