fix leak
authorChristian Grothoff <christian@grothoff.org>
Wed, 25 Jan 2017 14:53:43 +0000 (15:53 +0100)
committerChristian Grothoff <christian@grothoff.org>
Wed, 25 Jan 2017 14:53:43 +0000 (15:53 +0100)
src/core/core_api.c

index b6d8f61d2199b8b985469a010df72d66f0ec4a63..18b07068ff0cc79d017ca9e93478053ac47a2ef3 100644 (file)
@@ -204,6 +204,11 @@ disconnect_and_free_peer_entry (void *cls,
                                                        pr));
   GNUNET_MQ_destroy (pr->mq);
   GNUNET_assert (NULL == pr->mq);
+  if (NULL != pr->env)
+  {
+    GNUNET_MQ_discard (pr->env);
+    pr->env = NULL;
+  }
   GNUNET_free (pr);
   return GNUNET_YES;
 }