- fix error messages
[oweals/gnunet.git] / src / transport / test_transport_api_bidirectional_connect.c
index 7c5c593457b8e71a07d91530127436e715e4d5e8..5bc7d091bd081d53bd4489424b845a00e5428d66 100644 (file)
@@ -254,20 +254,22 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
   char *ps = GNUNET_strdup (GNUNET_i2s (&p->id));
 
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-              "Peer %u (`%4s'): peer (`%s') disconnected from me!\n", p->no, ps,
+              "Peer %u (`%4s'): peer (`%s') disconnected from me!\n",
+              p->no, ps,
               GNUNET_i2s (peer));
+  GNUNET_free (ps);
 
   if (GNUNET_SCHEDULER_NO_TASK != send_task)
   {
-
-       GNUNET_SCHEDULER_cancel(send_task);
-       GNUNET_break (0);
-               send_task = GNUNET_SCHEDULER_NO_TASK;
+    GNUNET_SCHEDULER_cancel(send_task);
+    GNUNET_break (0);
+    send_task = GNUNET_SCHEDULER_NO_TASK;
   }
-
-  if (th != NULL)
+  if (NULL != th)
+  {
     GNUNET_TRANSPORT_notify_transmit_ready_cancel (th);
-  th = NULL;
+    th = NULL;
+  }
 }