Fix NULL dereference.
authorDavid Barksdale <amatus.amongus@gmail.com>
Sun, 9 Oct 2011 02:56:16 +0000 (02:56 +0000)
committerDavid Barksdale <amatus.amongus@gmail.com>
Sun, 9 Oct 2011 02:56:16 +0000 (02:56 +0000)
Does this need to be a call to transmit_send_continuation?

src/transport/gnunet-service-transport_neighbours.c

index 8a588223f8ede842273097dc264a602209926d5d..c4d880d0a9c75e97c74ed5a8ca61c3a2b96f06d8 100644 (file)
@@ -470,7 +470,8 @@ disconnect_neighbour (struct NeighbourMapEntry *n)
   while (NULL != (mq = n->messages_head))
   {
     GNUNET_CONTAINER_DLL_remove (n->messages_head, n->messages_tail, mq);
-    mq->cont (mq->cont_cls, GNUNET_SYSERR);
+    if (NULL != mq->cont)
+      mq->cont (mq->cont_cls, GNUNET_SYSERR);
     GNUNET_free (mq);
   }
   if (NULL != n->is_active)