Fix memory leak in transport-testing
authorDavid Barksdale <amatus@amat.us>
Mon, 9 Oct 2017 21:10:52 +0000 (16:10 -0500)
committerDavid Barksdale <amatus@amat.us>
Mon, 9 Oct 2017 21:10:52 +0000 (16:10 -0500)
src/transport/transport-testing.c

index 918d70a9da50b858dbf39e9616110c54f0332ef5..68cda3bd7eb4d6412f086f11cc43449ff8d8b4f2 100644 (file)
@@ -678,6 +678,11 @@ GNUNET_TRANSPORT_TESTING_stop_peer (struct GNUNET_TRANSPORT_TESTING_PeerContext
     GNUNET_CONFIGURATION_destroy (p->cfg);
     p->cfg = NULL;
   }
+  if (NULL != p->handlers)
+  {
+    GNUNET_free (p->handlers);
+    p->handlers = NULL;
+  }
   GNUNET_CONTAINER_DLL_remove (tth->p_head,
                                tth->p_tail,
                                p);