set: destroy client mq properly
authorFlorian Dold <florian.dold@gmail.com>
Tue, 28 Feb 2017 16:26:05 +0000 (17:26 +0100)
committerFlorian Dold <florian.dold@gmail.com>
Tue, 28 Feb 2017 16:26:05 +0000 (17:26 +0100)
src/consensus/test_consensus.conf
src/set/gnunet-service-set.c

index f78b77d092296641693da79324452c4b02865c23..036150b7fdd91aa315ba150ec8a4af0daaf76aa0 100644 (file)
@@ -44,7 +44,7 @@ OPTIONS = -LERROR
 [set]
 #OPTIONS = -L INFO
 #PREFIX = valgrind --leak-check=full
-#PREFIX = valgrind
+PREFIX = valgrind
 
 [testbed]
 OVERLAY_TOPOLOGY = CLIQUE
index 3e6e0791a8fc5ed8c22d2a1b21d923cf204b8bd0..4168685f178dd18cb2b706fd1208e0fef3b7916d 100644 (file)
@@ -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);
 }