related to mantis bug 1744
authorMatthias Wachs <wachs@net.in.tum.de>
Fri, 5 Aug 2011 10:50:53 +0000 (10:50 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Fri, 5 Aug 2011 10:50:53 +0000 (10:50 +0000)
src/transport/gnunet-service-transport.c

index ea7ce98dbf8d936c1281dea45f146f0ef948d3c3..cf02d14b26653156a92bf49dbdefacbef8671eff 100644 (file)
@@ -1446,6 +1446,15 @@ transmit_to_client (struct TransportClient *client,
   struct ClientMessageQueueEntry *q;
   uint16_t msize;
 
+  /* Client==NULL when GNUNET_SERVER_Client disconnected and was
+   * freed in client_disconnect_notification
+   */
+  if (client->client == NULL)
+    {
+      GNUNET_break (0);
+      return;
+    }
+
   if ((client->message_count >= MAX_PENDING) && (GNUNET_YES == may_drop))
     {
       GNUNET_log (GNUNET_ERROR_TYPE_INFO,